Closed (won't fix)
Project:
Image
Version:
7.x-1.x-dev
Component:
image.module
Priority:
Minor
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
7 Nov 2008 at 03:42 UTC
Updated:
15 Aug 2011 at 02:09 UTC
Is it possible to manually regenerate derivatives for all images from a central place?
(start the process once, and expect the system to find all the relevant nodes and update their derivatives automatically)
Comments
Comment #1
JonGirard-1 commentedI was also wondering something simillar.. if it's possible to stop them from automatically regenerating each time something is changed with the image crop and size settings..? Or atleast, to hide the message which shows up on everyone's profile page which says which images had been regenerated.
Comment #2
Leeteq commentedYes, that is a concern too, to have some practical control on how, when and for whom those messages are shown. They are irrelevant and incomprehendable for normal users.
Comment #3
Hetta commentedyou can easily recreate your derivatives all at once:
- admin -> content management -> content - > Show only items where: type: image -> Update options: rebuild image thumbnails.
It helps if you 1) set your lists to something insane like 200 or so nodes, and 2) start from the last page of images. You're done when you start to hit images marked "new".
Comment #4
Leeteq commentedAh, I have actually seen that option several times, just did not think of it.
That is sufficient for now/my current need, although not for a really big site.
I think this might be a good feature request for a special function / button on the admin pages in a future release. Marking it as such to check if others are of the same opinion.
Comment #5
JonGirard-1 commentedNow the opposite (sort of.) Is there anyway to hide that message that shows all the regenerated images that appears on any page with image nodes?
Comment #6
Leeteq commentedYes, that is also practical to avoid. Perhaps a separate feature request?
Comment #7
sunSorry, unfortunately this request is way too specific. Feel free to re-open this issue if you want to supply a patch.
Comment #8
wickwood commentedWhen I do this
with all of the image nodes selected, the derivatives do not get built and I get "Page Not Found" error.
If I do it with a single image node it works fine in rebuilding the images. But as I start to do more than 1 at time, around 3 or 4 I start to get errors that not all of the derivatives are being created.
I really need to find a way for my client to upload their images in bulk, and get the derivatives made since doing it on demand causes too many other problems.
I'm using the Imagemagick Tool Kit, as the GD bombs with memory problems. PHP Memory Limit is set to 90M (the limit by the host).
I'm sure this failure is also a memory problem, so I think need to find or make a script that will give the client a link to run this function sequentially on each image.
Any help you can give me will be greatly appreciated!
Thanks in advance!
Steve
Comment #9
Hetta commentedHow does the site react to looking at galleries, one by one by one by one by one? That'll regenerate derivatives, too, if the thumbnails (and/or other derivatives) have been deleted off the hard drive (or server) first.
Comment #10
wickwood commentedThanks for your reply, Hetta.
I find that if there are more than 1 image that needs derivatives created I will often get a message that a few of the derivatives were not created. If there is a very large number to create, I have also found that it appears to work with a few error messages, but none those derivatives are not indeed saved in the files/images directory.
Because of the jQuery scripts I'm using on this site to replace images in certain instances, I really need to have the derivatives created first, not on the fly.
Ideally, I would like to have the derivatives created immediately after import so that the client (and their employees) doesn't have to remember to do any extra steps.
I'm reviewing the modules code now to see how I might call for the derivatives to be created after importing without causing the other memory problems I have read about in other posts when trying to do this.
I'm also trying to do more controlled testing to see when and where it actually fails.
Thanks for you help,
Steve
Comment #11
sunSorry, unfortunately this request is way too specific. Feel free to re-open this issue if you want to supply a patch.
Comment #12
westbywest commentedI was able to effect a cron-triggered regeneration of image derivatives in D7 as follows:
1. Create a view with a page display which displays all desired image derivatives as fields in a list of nodes. I.e. so that loading this view's URL in a browser triggers image derivative generation. You don't have to use a pager; we'll be making wget wait a delay before each request.
2. For sake of simplicity, disable all blocks for this view's URL. I.e. try to only have the view display the image derivatives and as few links as possible.
3. Launch wget in a cron job on some period, e.g. every 2hrs, like so:
The important bits are the "-w 5", the "-P /tmp/wget-drupal", and the "-I sites/default/files/styles" options. The first tells wget to wait 5sec before each request, i.e. so that it's not trying to download all image derivatives one immediately after another. The 2nd tells wget to store the files it downloads locally, so it can maintain a local cache to compare against. The 3rd option tells wget only to download image derivative files.
You would need to alter this wget command to match your setup.