Can I trigger an action after replacement
-
I’m using ImgIX to serve the images on my website. ImgIX caches all images, so if you update an image with the same filename, ImgIX will serve the old image.
You can purge the cache for a single image using curl or PHP. I have a PHP script that will purge the image, so all I need to do now is hook into the Enable Media Replace plugin.
My function is imgix_purge($filename), and I have it in my own custom plugin. I want my plugin to ‘listen’ for a media replacement where the user chooses to keep the existing filename. Then, I need to get the filename (and relative path) and pass it as an argument to my function.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Can I trigger an action after replacement’ is closed to new replies.