# How do you change the "login with patreon" button image?

**URL:** <https://www.patreondevelopers.com/t/how-do-you-change-the-login-with-patreon-button-image/7060>\
**Category:** Uncategorized\
**Created:** [February 19, 2023, 4:11pm UTC](https://www.patreondevelopers.com/t/how-do-you-change-the-login-with-patreon-button-image/7060 "2023-02-19T16:11:22Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kyrian](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/kyrian/32/2212_2.png) [@Kyrian](https://www.patreondevelopers.com/u/Kyrian)\
**Post date:** [February 19, 2023, 4:11pm UTC](https://www.patreondevelopers.com/t/how-do-you-change-the-login-with-patreon-button-image/7060/1 "2023-02-19T16:11:22Z")

</div>

I tried to use the option “Use a custom Button” but that must be for another kind of button. Because the button showing in the login form stays the same.

Actually, I just need to change the language of the button, but it’s an img tag so I don’t think I can do this with css

Thanks

---

<div class="post-metadata">

**Author:** ![codebard](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/codebard/32/14_2.png) [@codebard](https://www.patreondevelopers.com/u/codebard)\
**Post date:** [February 20, 2023, 3:10pm UTC](https://www.patreondevelopers.com/t/how-do-you-change-the-login-with-patreon-button-image/7060/2 "2023-02-20T15:10:25Z")

</div>

Which plugin is this?

---

<div class="post-metadata">

**Author:** ![Kyrian](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/kyrian/32/2212_2.png) [@Kyrian](https://www.patreondevelopers.com/u/Kyrian)\
**Post date:** [February 20, 2023, 3:25pm UTC](https://www.patreondevelopers.com/t/how-do-you-change-the-login-with-patreon-button-image/7060/3 "2023-02-20T15:25:01Z")

</div>

is Patron PRO plugin

---

<div class="post-metadata">

**Author:** ![codebard](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/codebard/32/14_2.png) [@codebard](https://www.patreondevelopers.com/u/codebard)\
**Post date:** [February 22, 2023, 1:23pm UTC](https://www.patreondevelopers.com/t/how-do-you-change-the-login-with-patreon-button-image/7060/4 "2023-02-22T13:23:59Z")

</div>

Have you tried just replacing it with another image button?

---

<div class="post-metadata">

**Author:** ![Kyrian](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/kyrian/32/2212_2.png) [@Kyrian](https://www.patreondevelopers.com/u/Kyrian)\
**Post date:** [February 22, 2023, 1:40pm UTC](https://www.patreondevelopers.com/t/how-do-you-change-the-login-with-patreon-button-image/7060/5 "2023-02-22T13:40:09Z")

</div>

Well, of course I can replace the image… but won’t it be overwritten when the plugin updates?

---

<div class="post-metadata">

**Author:** ![Kyrian](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/kyrian/32/2212_2.png) [@Kyrian](https://www.patreondevelopers.com/u/Kyrian)\
**Post date:** [March 2, 2023, 1:39pm UTC](https://www.patreondevelopers.com/t/how-do-you-change-the-login-with-patreon-button-image/7060/7 "2023-03-02T13:39:32Z")

</div>

This is the setting I use to insert a custom image for the button. It is simply not working.  
The custom image should be grabbed from

` https://accademiainfinita.it/2/wp-content/uploads/2023/02/patreon-login-button.png`

Instead, it still grabs

`https://accademiainfinita.it/2/wp-content/plugins/patron-plugin-pro/plugin/lib/patreon-connect/assets/img/patreon%20login@1x.png`

 ![633014c6-c7d2-49fe-8896-a723200948be](https://canada1.discourse-cdn.com/flex036/uploads/patreondevelopers/original/2X/f/f83d68e2d87b851d386d9772b19a8d35ffe72e9d.png)

I know I can just manually change the image file but I guess it would be overwritten again with every plugin update?

---

<div class="post-metadata">

**Author:** ![codebard](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/codebard/32/14_2.png) [@codebard](https://www.patreondevelopers.com/u/codebard)\
**Post date:** [March 2, 2023, 3:54pm UTC](https://www.patreondevelopers.com/t/how-do-you-change-the-login-with-patreon-button-image/7060/8 "2023-03-02T15:54:46Z")

</div>

Ah. That custom button does not change the login image. It changes the Unlock with Patreon button that is used in locked post interfaces.

> <https://github.com/Patreon/patreon-wordpress/blob/e5c0656b5e0631abbfa93b18ca110c7abd1aafab/classes/patreon_frontend.php#L923>

ptrn/login\_button filter should allow you to change entire login button.

---

<div class="post-metadata">

**Author:** ![Kyrian](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/kyrian/32/2212_2.png) [@Kyrian](https://www.patreondevelopers.com/u/Kyrian)\
**Post date:** [March 2, 2023, 5:06pm UTC](https://www.patreondevelopers.com/t/how-do-you-change-the-login-with-patreon-button-image/7060/9 "2023-03-02T17:06:42Z")

</div>

Thank you!  
Can you provide code to also change the “Connect to your Patreon” button image?

![patreon connect@1x](https://canada1.discourse-cdn.com/flex036/uploads/patreondevelopers/original/2X/7/752282d5340a86b7a6bc6a7ed642174cd1977179.png)

---

<div class="post-metadata">

**Author:** ![Kyrian](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/kyrian/32/2212_2.png) [@Kyrian](https://www.patreondevelopers.com/u/Kyrian)\
**Post date:** [March 2, 2023, 5:28pm UTC](https://www.patreondevelopers.com/t/how-do-you-change-the-login-with-patreon-button-image/7060/10 "2023-03-02T17:28:54Z")

</div>

I tried with something like this

```auto
	function my_custom_login_button( $button_html, $href ) {
    // Change the URL of the image to your desired image.
    $new_image_url = site_url() . '/wp-content/uploads/2023/02/patreon-login-button.png';

    // Replace the existing image URL with the new image URL.
    $button_html = str_replace( PATREON_PLUGIN_ASSETS . '/img/patreon-logomark-on-coral.svg', $new_image_url, $button_html );

    return $button_html;
}
add_filter( 'ptrn/login_button', 'my_custom_login_button', 10, 2

```

);

but it create a fatal error in frontend

I am not so sure that filter is the right place to look? Because it mentions  
/img/patreon-logomark-on-coral.svg  
but the image I am actually trying to swap is  
/wp-content/plugins/patron-plugin-pro/plugin/lib/patreon-connect/assets/img/patreon%20login@1x.png

---

<div class="post-metadata">

**Author:** ![codebard](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/codebard/32/14_2.png) [@codebard](https://www.patreondevelopers.com/u/codebard)\
**Post date:** [March 7, 2023, 9:10pm UTC](https://www.patreondevelopers.com/t/how-do-you-change-the-login-with-patreon-button-image/7060/11 "2023-03-07T21:10:07Z")

</div>

Cant say anything without knowing the error though…

---

<div class="post-metadata">

**Author:** ![Kyrian](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/kyrian/32/2212_2.png) [@Kyrian](https://www.patreondevelopers.com/u/Kyrian)\
**Post date:** [March 8, 2023, 9:02am UTC](https://www.patreondevelopers.com/t/how-do-you-change-the-login-with-patreon-button-image/7060/12 "2023-03-08T09:02:48Z")

</div>

In the end I just switched the original images, and will keep switching them with every update of the plugin 😅.  
But don’t you think it would be better to have the possibility to add custom buttons from the plugin settings?  
Or maybe create buttons that have real text that can be translated.

Thanks

---

<div class="post-metadata">

**Author:** ![codebard](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/codebard/32/14_2.png) [@codebard](https://www.patreondevelopers.com/u/codebard)\
**Post date:** [March 9, 2023, 6:42pm UTC](https://www.patreondevelopers.com/t/how-do-you-change-the-login-with-patreon-button-image/7060/13 "2023-03-09T18:42:08Z")

</div>

The pro version should provide changing of main unlock image.

---

<div class="post-metadata">

**Author:** ![Kyrian](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/kyrian/32/2212_2.png) [@Kyrian](https://www.patreondevelopers.com/u/Kyrian)\
**Post date:** [March 10, 2023, 8:38am UTC](https://www.patreondevelopers.com/t/how-do-you-change-the-login-with-patreon-button-image/7060/14 "2023-03-10T08:38:03Z")

</div>

See here [How do you change the "login with patreon" button image? - #5 by Kyrian](https://www.patreondevelopers.com/t/how-do-you-change-the-login-with-patreon-button-image/7060/5)

I tried to use that feature but it doesn’t work for me.  
Plus, there are 2 separate button images, one is “connect your Patreon” the other one is “login with Patreon”

The “use a custom button” settings i Patron PRO plugin only allow changing the “login with Patreon” button. But again, I tried to use it, and it does nothing for me.

Not a big issue, I can keep updating the images manually every time I update the plugin, but maybe look into it for future releases.

---

<div class="post-metadata">

**Author:** ![codebard](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/codebard/32/14_2.png) [@codebard](https://www.patreondevelopers.com/u/codebard)\
**Post date:** [March 13, 2023, 10:10pm UTC](https://www.patreondevelopers.com/t/how-do-you-change-the-login-with-patreon-button-image/7060/15 "2023-03-13T22:10:48Z")

</div>

May be a Patron Pro bug. Ill look into this for near future releases. For the time being, you can use the filters to override it. Patron Pro should allow hooking into every single function that it has and it should allow you to run actions and filter variables before and after a function runs.
