You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Produces a .jpg file. But doing this in Twig produces a completely different file with the .jpeg extension
{{ web_image(path).zoomCrop(100, 100) }}
I would have thought both of these calls are the same, so any subsequent calls would not produce the same file again. But it does run the resize and crop again.
How can I stop this from happening? So that the cache is used and is useful across both Twig and the Controller?
The text was updated successfully, but these errors were encountered:
Hm, we should track this to understand what is really different
If the hash is different, the operation applied may look different to the Image handler, you could try dumping the array that is hashed by the Gregwar/Image class in both cases
I looked at the array and I think the issue comes from the path. Using image or web_image produces two different paths, rightly, and therefore two different hashes and two different images. This is fine and would be hard to engineer around as one path is absolute and the other relative.
But that doesn't explain why sometimes it produced a .jpg file and other times a .jpeg file?
I have been having some major issues with the cache. Doing the following in a Controller
$imageFormatter->open($path)->zoomCrop(100,100)->jpeg()
Produces a .jpg file. But doing this in Twig produces a completely different file with the .jpeg extension
{{ web_image(path).zoomCrop(100, 100) }}
I would have thought both of these calls are the same, so any subsequent calls would not produce the same file again. But it does run the resize and crop again.
How can I stop this from happening? So that the cache is used and is useful across both Twig and the Controller?
The text was updated successfully, but these errors were encountered: