wordpress-activitypub icon indicating copy to clipboard operation
wordpress-activitypub copied to clipboard

Feature Request: Local Cache for Profile-Pictures

Open kaffeeringe opened this issue 1 year ago • 13 comments

What

It would be great if the plugin cached the users' profile pictures locally.

Why

My website doesn't show the users' profile pictures because of the Content Security Policy and the fact that they are embedded from a remote URL.

How

There are plugins that do the same thing for gravatar images. e.g. FV Gravatar Cache

kaffeeringe avatar Oct 05 '24 19:10 kaffeeringe

I second this. I also consider this to be a (minor) privacy issue. Furthermore caching them locally would allow for optimized image sizes and faster load times.

Menrath avatar Jan 08 '25 16:01 Menrath

Also seconding this request, my site has the same issue or a very similar one.

JamesMasino avatar Mar 02 '25 09:03 JamesMasino

Related to: https://codeberg.org/Event-Federation/wordpress-event-bridge-for-activitypub/issues/151

I would love to see a "unified" way how to store remote cached media in WordPress ActivityPub.

Menrath avatar Mar 23 '25 10:03 Menrath

FYI: https://wordpress.org/support/topic/fediverse-reaction-block-loads-huge-images/

pfefferle avatar Mar 28 '25 21:03 pfefferle

Regarding the local caching of gravatars, please also have a look at the proxy settings of Gravatar Enhanced by Automattic.

https://support.gravatar.com/gravatar-enhanced-wordpress-plugin/#proxy

I like the scheduled proxy flush:

Cached images are cleared on a weekly schedule using the WordPress cron system. You can change the gravatar_proxy_flush_frequency filter described below. Note that if a user changes there avatar during this period it will not be reflected on your site until the cache has been cleared.

GitHub: github.com/Automattic/gravatar-enhanced

nickbohle avatar Mar 31 '25 07:03 nickbohle

I've changed my avatar image in Gravatar and I see the change in my WP instance. But I'm not seeing the updated image in the Fediverse (on the instance where I have an account, when I search for my profile@[email protected] )

Is that related to this caching question? …or is it simply a matter of waiting for the fediverse instances to recheck with gravatar? …or should I open a new issue/feature request? :)

craigconstantine avatar Apr 07 '25 12:04 craigconstantine

The problem is, that WordPress is not triggered when you change your Gravatar. Means: Your WordPress installation does not know if you have a new avatar and so we can't send an update. Either you change something else on WordPress, so that the plugin sends the update Activity or you have to wait 🫣

pfefferle avatar Apr 07 '25 12:04 pfefferle

That makes perfect sense. What/where can I change something that will tickle that?

craigconstantine avatar Apr 07 '25 13:04 craigconstantine

when it is about your user, change something in the profile settings /wp-admin/profile.php (preferred in the ActivityPub section), if it is about the blogs profile you have to change something in the blog-settings /wp-admin/options-general.php?page=activitypub&tab=blog-profile

pfefferle avatar Apr 07 '25 13:04 pfefferle

…okay, I've made a change, but I presume there's no way to see a "last modified" timestamp anywhere to verify whatever-it-is being published by ActivityPub is actually marked as newer? I don't see any change on any of my profiles in the Fediverse—I expect to have to wait for the instance(s) to cache-timeout before rechecking the profile(s)… just would be nice to know I've "bumped" the right thing. ¯\_(ツ)_/¯

craigconstantine avatar Apr 07 '25 13:04 craigconstantine

The problem is still, that your Gravatar URL does not change with the avatar change... So mastodon might still think it is the same picture... 🫣

pfefferle avatar Apr 07 '25 13:04 pfefferle

oh! well, then this isn't a problem with ActivityPut at all. It's a problem with fediverse instances not periodically checking last-modified or cache expiration on images associated with fediverse profiles :)

craigconstantine avatar Apr 07 '25 13:04 craigconstantine

who's to blame...

I think it is like the fediverse... it is a federated problem 😉

pfefferle avatar Apr 07 '25 14:04 pfefferle

This issue is stale because it has been open 120 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Aug 06 '25 02:08 github-actions[bot]

keep

pfefferle avatar Aug 06 '25 13:08 pfefferle

For your information, Gravatar Enhanced (👆) not only caches Gravatars, but also (Fediverse) avatars. Furthermore, it reloads the image every seven days.

nickbohle avatar Aug 09 '25 11:08 nickbohle