Bill Dalton Posted September 23, 2023 Share Posted September 23, 2023 I see lots of modules that will regenerate thumbnails, but they are all as slow as molasses on a cold day. I need something that knows how to take advantage of a dedicated server and write a million images in a reasonable amount of time. Does anyone have any suggestions? Link to comment Share on other sites More sharing options...
ComGrafPL Posted September 24, 2023 Share Posted September 24, 2023 I have used this one: https://boutique.comonsoft.com/gb/free-prestashop-modules/27-regeneration-of-prestashop-images.html 1 Link to comment Share on other sites More sharing options...
Bill Dalton Posted September 24, 2023 Author Share Posted September 24, 2023 Thanks! I am using something similar, Ajax, to regenerate images. But these modules are all set for low resource use. A trick I use to overcome this limitation is to open multiple browsers and set each to work on a different image size simultaneously. That helps a lot, but I sure wish I could find something made for power users and not shared hosting speed. 1 Link to comment Share on other sites More sharing options...
ps8modules.com Posted September 27, 2023 Share Posted September 27, 2023 Hi. A lot of programmers forget that some php and GD functions are slow. For example, when regenerating images, it generates a new white background every time and for every dimension. Another problem is in the pictures. The image has a jpg extension, but it is a png image. So, for each image, its image type must be determined. For my customer, I programmed a module that, when saving a product image, writes its correct image type into the ps_image table. Furthermore, when the regeneration is started, the module creates all white backgrounds for all image types and starts ajax several times, for each size separately. 10,000 images are done in no time. 1 Link to comment Share on other sites More sharing options...
Bill Dalton Posted September 27, 2023 Author Share Posted September 27, 2023 @ps8moduly.cz and is this a module that you sell? Link to comment Share on other sites More sharing options...
ps8modules.com Posted September 27, 2023 Share Posted September 27, 2023 Hi. Sorry, not for sale. Built for specific customer requirements, it includes many other features than just image regenerate. But I was already thinking about modifying it for sale. Link to comment Share on other sites More sharing options...
ComGrafPL Posted November 1, 2023 Share Posted November 1, 2023 On 9/27/2023 at 2:52 PM, ps8moduly.cz said: Hi. Sorry, not for sale. Built for specific customer requirements, it includes many other features than just image regenerate. But I was already thinking about modifying it for sale. Would be great to have it. Regenerate for like 100k+ is real pain 1 Link to comment Share on other sites More sharing options...
QuickUpdate.net Posted November 2, 2023 Share Posted November 2, 2023 We have included this functionality in our Prestashop suite QuickUpdate - eg you are able to regenerate images for any number of products down to the product level. Additionally if you have a large number of products you will have a very speedy regeneration and not get a time out because the app does batch parallel processing of the products you want to regenerate / up to 5 parallel requests at once. This is how it looks: Link to comment Share on other sites More sharing options...
ZHSoft Posted November 6, 2023 Share Posted November 6, 2023 If your server performance is average, then please generate images one by one like this: 1.Select an image 2.Select a format 3.Erase previous images:No In this way, you can prevent the server from getting stuck and avoid the time-consuming wait of generating a large number of images at once. The only cost is that you need to do it a few more times. But this can operate accurately and maintain the stability of the PrestaShop core. Link to comment Share on other sites More sharing options...
Bill Dalton Posted November 6, 2023 Author Share Posted November 6, 2023 @ZHSoft thank you for your post. It is good advice for how to use the native PS image generator. The problem in this thread isn't server performance is average. The problem is generating 1 million images on a dedicated server in a reasonable time. If you have a lot of images and you have dedicated server resources, there isn't a power user method to generate images. I see that PS 8.1.2 is using Node.js sharp to generate images. It is certainly possible to use that in a more powerful way. Link to comment Share on other sites More sharing options...
QuickUpdate.net Posted November 6, 2023 Share Posted November 6, 2023 (edited) @Bill Dalton The most problematic issue when you regenerate a large number of images as you say you have is not having a sense of control and completion of the task (because of errors / timeouts etc.). In case you have a consistent method of regenerating those images without the "fear" of timeout of failure - your issue should not longer be a problem - my point being that the core of your problem (and others) is consistency and not speed (eg. you could leave a regenerating task to run for 1,2,3 days as long as you know the process will complete and do the job consistently for you). Edited November 6, 2023 by QuickUpdate.net (see edit history) 1 Link to comment Share on other sites More sharing options...
Bill Dalton Posted November 6, 2023 Author Share Posted November 6, 2023 @QuickUpdate.net, what you just described is what we have now. I'm glad you are happy with the status quo. This thread is about me, wanting more power. Link to comment Share on other sites More sharing options...
QuickUpdate.net Posted November 6, 2023 Share Posted November 6, 2023 😄 Ok then i misunderstood the point of discussion. Link to comment Share on other sites More sharing options...
ZHSoft Posted November 8, 2023 Share Posted November 8, 2023 @Bill Dalton First set Erase previous images: Yes, which will delete the old thumbnail images that are already there. Then set Erase previous images: No. Don’t worry if the timeout occurs. Continue to set Erase previous images: No. Keep setting Erase previous images: No in this way until all prompts are generated. This is the mechanism of PrestaShop. It will automatically detect which pictures have not been successfully generated. Therefore, as long as you maintain the above operations, they will be successfully generated in the end. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now