Closed EGGamer closed 1 year ago
Hey @EGGamer! It's a very nice idea, so it'll be there eventually, I just have to figure out the most performant way of doing it!
@WalkingPizza any update on this?
Apologies for the delay.
You can now do this by copying this gist into your ./database/migrations
folder and starting your Strapi instance!
It basically retrieves BATCH_SIZE
files at a time, making sure to only retrieve those that have a mime type starting with image/
, a URL and no placeholder value, and then tries to generate and update the placeholder.
Let me know if it works!
It worked for me, thanks!
Apologies for the delay.
You can now do this by copying this gist into your
./database/migrations
folder and starting your Strapi instance!It basically retrieves
BATCH_SIZE
files at a time, making sure to only retrieve those that have a mime type starting withimage/
, a URL and no placeholder value, and then tries to generate and update the placeholder.Let me know if it works!
Works nicely. Thank you!
A couple of important details:
Hope this helps someone!
Closing issue as feature was implemented and README was updated https://github.com/WalkingPizza/strapi-plugin-placeholder/pull/5
It would be nice if the plugin had a button to generate placeholders for already uploaded images before the plugin was installed (or if it did it automatically). Otherwise, we need to re-upload them and in large-scale projects it might not be easy