- 🇺🇸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 10:25am 27 June 2023 - 🇪🇸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 11:01am 27 June 2023 - 🇪🇸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.