craft-imageoptimize
craft-imageoptimize copied to clipboard
Image thumbnail not loaded on file upload
Describe the bug
If we use asset structures corresponding to entries slugs, image thumbnails do not work until the first press of Ctrl + S
https://user-images.githubusercontent.com/496132/185643088-3a8c01df-0b90-4a93-99c2-f31a5b3e4c37.mp4
To reproduce
Steps to reproduce the behaviour:
- Go to "Some asset field settings"
- Set
{slug}
in the Asset Location input - Try to add new entry [don't save it]
- Upload image
Expected behaviour
Create and show image thumbnail on upload [will be good] Or show jpg-placeholder like it works in Craft without Image Optimize plugin.
Screenshots
See above
Versions
- Plugin version 4.0.2:
- Craft version 4.2.1.1:
Also on the Craft 4.x, on the same version of the plugin, I experience the same problem. Bump.
I think this is due to the way the uploading works for assets; when you upload them via an entry, they aren't actually saved in the same manner as if you uploaded them directly to Assets.