Not able to clear/purge images with image style.

Created on 6 July 2022, over 2 years ago
Updated 27 June 2023, over 1 year ago

Problem/Motivation

Not able to purge images associated with image style

Steps to reproduce

Proposed resolution

Images associated with image style should be purged on update

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇮🇳India dipayanpramanik5 New Delhi

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇺🇸United States patrickfweston Columbus, Ohio

    I'm having an issue getting image styles cleared out on update. I have media entities using a File field instead of an Image field, and I'm wondering if this is part of the reason I'm not seeing styles get flushed.

    I'm going to do some experimentation and see how I can get this to work.

  • 🇺🇸United States patrickfweston Columbus, Ohio

    I was unable to get image style derivatives successfully cleared out of the Varnish cache using this module out of the box.

    I've attached a patch that extends this module's code to also check for the existence of image style files, adding them to the set of URLs to be invalidated in Varnish.

    Since I'm unable to confirm if this issue is widespread or specific to my site, I'm not going to create a new issue for this. However, I thought the patch could be helpful to folks who may encounter the same issue.

  • Status changed to Needs review over 1 year ago
  • 🇪🇸Spain tunic Madrid

    I guess we should review this, so open the issue again or it will never be reviewed.

  • Status changed to Fixed over 1 year ago
  • 🇪🇸Spain omarlopesino

    Thanks for raising it.

    However, this problem has been addressed with a more generic approach at https://www.drupal.org/project/purge_file/issues/3308665 Include Query String Variants in Purge Request Fixed . It works so that you can setup the module to clear URLs with the wildcardurl invalidator. Ths invalidator purges URLs of files and any query string variant. As image styles URL are basically URls with itok query string, that solution fixes also the image styles issue.

    This topic has been talked at comments #6 and #7 of the issue i've linked above.

    Marked as fixed, if I missed something please let me know.

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024