• Hi,

    I’m working on my pageload speed, and I installed WP Smush in order to reduce the file sizes of my images.

    It went through and optimized 235 images on my site – WithKids.world

    But when I tested the page via GTmetrix, the homepage file size was unchanged. Since researching this topic I realize now (I think) that I was already using Photon as an image CDN, which was activated via Jetpack. And since my images were hosted there, when I “smushed” them, the CDN-hosted images weren’t affected. Thus the unchanged page size. Moreover, there doesn’t seem to be any way for me to apply Smush to the images on Photon.

    This thread (https://www.ads-software.com/support/topic/photon-and-wp-smush-it/) addresses using Photon and Smush together – but it doesn’t answer the question of what to do if you started using Photon first, and then want to optimize further via Smush. It seems that even if I deactivate Photon, the site will still reference the CDN cached images unless I go through and rename/reupload them all, or email the Photon developer with a list of files to delete. I’d really prefer not to do either of those.

    So several questions here:
    1) If I already have all of my images in Photon, are there additional benefits to using Smush? It sounds like there are, from the thread linked above.

    2) If the answer to #1 is yes – then is there any way to re-index the images that are hosted on the Photon CDN, so that they serve the “post-Smush” image?

    3) I assume that for new images moving forward, if I have both Photon and Smush active, then Photon will get the post-Smush image and serve it via the CDN. Correct?

    Thanks very much!
    Jordan

Viewing 7 replies - 1 through 7 (of 7 total)
  • @jordanweinstein

    I know the cache life on Photon is 12 months or so.

    You can rename the images, then they would be updated on Photon.

    https://developer.wordpress.com/docs/photon/

    Thread Starter jordanweinstein

    (@jordanweinstein)

    Renaming all of the images seems like a very labor-intensive way of accomplishing this. Hopefully there’s an easier way, as I’m obviously not the first person who has needed to do this.

    @jordanweinstein

    It is one of the limitations of Photon.

    No cache invalidations – currently the images are cached “forever”. If you want to “refresh” an image you will need to change the name of the image. Adding random query arguments, commonly known as cachebusters, will not work.

    Thread Starter jordanweinstein

    (@jordanweinstein)

    @jeherve – Any feedback here? I’ve seen your very helpful responses on similar threads, explaining how Photon works. If this question has already been answered, my apologies – I’ve searched but haven’t found this info. I’ve seen many threads where you explain how Photon caching works – but could you help me understand whether, once Photon caches an image, there is any way to get it to either:
    1) Re-cache a compressed version of the image, without re-naming all images; or if not
    2) Remove/uninstall the plugin so that images are rendered from my WordPress host instead of the Photon CDN. This would allow me to re-start everything with compressed images, and then turn on Photon again to pick up the compressed files via the CDN.

    Thanks!

    Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    Re-cache a compressed version of the image, without re-naming all images

    I’m afraid that can’t be done. I can invalidate cache for specific images if you give me URLs, thus forcing Photon to cache the new version of the image, but that can’t be done for a while site at once I’m afraid.

    Remove/uninstall the plugin so that images are rendered from my WordPress host instead of the Photon CDN. This would allow me to re-start everything with compressed images, and then turn on Photon again to pick up the compressed files via the CDN.

    That won’t help, as Photon’s cache isn’t flushed when you deactivate the plugin. As @lukecavanagh mentioned above, the images are cached for a very long period of time, and turning the plugin off and on won’t invalidate that cache.

    I’m afraid your only solution here will be to rename the images files.

    Thread Starter jordanweinstein

    (@jordanweinstein)

    @jeherve – thanks very much for the timely response.

    Is this (the ability to uncache images) a feature that you’re developing? It seems like it would be useful. Especially given the degree to which Jetpack is “built in” to WordPress, I think that many users simply turn it on without knowing much about how it works (I did). So it’s surprising to find out that that choice has now put me in a position where I need to invest a lot of time in order to optimize the size of my images.

    Thanks,
    Jordan

    Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    Is this (the ability to uncache images) a feature that you’re developing? It seems like it would be useful.

    We’ve discussed about it, but haven’t found a way to implement it yet; it’s currently not possible. We haven’t given up though, and if we find a way to implement that option, we will!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘WP Smush / Photon’ is closed to new replies.