getgrav / grav-plugin-admin

Grav Admin Plugin
http://getgrav.org
MIT License
354 stars 227 forks source link

Image cache #926

Open leotiger opened 7 years ago

leotiger commented 7 years ago

Hi again.

Working hard on Grav... Next issue:

While in admin with image cache enabled, plugins like resize-images and other image manipulations targeted for the uncached versions are rerouted and execute their work on the cached versions. That's contra-productive as all manipulations are lost once the cache is cleared and even some are never used, e.g. in the filepicker field.

The culprit for this is located in ImageMedium.php, in its constructor. Definitely it would be great for plugin authors to be able to control cache / nocache by hooking into an event to bypass temporarily the cache for media manipulations.

Regards. uh

leotiger commented 7 years ago

Update: I opened an issue for the resize-images plugin as well offering a code proposal to solve this: Resize-Images

leotiger commented 7 years ago
  1. Update: Bypassing the image cache makes this solution operative once again: Issue 842 but we now face the problem that the derivates do not arrive in the image cache, only the now downsized original. The whole workflow is inconsistent.