Most of my image nodes have been edited after being uploaded.
Some of them seem to have lost or just don't have thumbnails or other size images apart from the original.
This of course ruins my gallery displays (acidfree), and it would be nice if that never happened.

But if I try to rebuild thumbnails from the admin-content menu,
nothing happens so the thumbnails still don't get generated.

What should I do now?

Ktnk.

CommentFileSizeAuthor
#8 image_154156.patch8.63 KBdrewish

Comments

ktnk’s picture

can you at least add an option in the image edit form to "update the thumbnails upon saving"
so that I can manually force thumbnails to get regenerated on certain images?

drewish’s picture

i think adding an option to manually rebuild the thumbnails for an image would be helpful. but if rebuilding thumbnails from the admin-content menu doesn't work there's another problem. the option on the node edit form would call exactly the same code and have the same result.

ktnk’s picture

adding an option to manually rebuild the thumbnails for an image will solve at least half of my problems.
We'll se about the remaining ones that don't resize (perhaps an image format issue?..)

drewish’s picture

well now we're back to what's wrong with using the rebuild thumbnails on the admin/content/node ? because as i just said it's going to work just as well... you can filter the list of nodes to just show images and then rebuild a way...

ktnk’s picture

Well, at this point, I have 4000 images.
there's no easy way to filter for images that need resizing. if I navigate my albums, I see the ones that need resizing. When in admin-contents, I can't even filter images by name. Si it's really hard to search for each one needing resizing, then going to admin menu and trying out the resize..

Karima.

drewish’s picture

i'm with you now. while test this patch: http://drupal.org/node/133436 i ran into the same problem. the admin/content/node screen makes it hard to find a specific image. i've added the feature to the patch on #133436 so when that gets tested and committed it'll be in there.

drewish’s picture

Title: Thumbnail resize issue » Add rebuild derivative images option to node edit form

better title. i think i'm going to put this in before #133436. it's too useful of a feature.

drewish’s picture

Version: 5.x-1.2 » 5.x-1.x-dev
Status: Active » Needs review
StatusFileSize
new8.63 KB

okay here's a patch that pulls in some of the code from #133436. i'd love to get some feedback on this.

Camus-1’s picture

I think this is a useful function to have.

I've applied this patch on top of #158334. Understandably, hunk #6 failed at 560. I've fixed that by hand. I've also added an underscore characters to the call to image_get_sizes() in function _image_save and in function image_update after getting the fatal error of "call to undefined function image_get_sizes()" on both lines.

The module works as expected with uploading new images, but I could see the option to "Rebuild image derivatives" on node/add/image. I'm afraid the option is going to cause unnecessary confusion among casual users as it might sound cryptic to them.

Now when I try to use the "Rebuild image derivatives" option on the images which previously failed using admin/content/node, I got the following messages:

Unable to create scaled Thumbnail image

* The derivative images for {image name} have been regenerated.
* The Image has been updated.

As drewish has mentioned, if it fails using admin/content/node it would also fail here as it is using the same codes. Perhaps we should try a different approach.

If I re-upload the very same image at node/{nid}/edit, the image derivatives would be perfectly created. Perhaps, for it to work, the new approach should treat the image as being freshly uploaded.

I did re-try the "Rebuild image derivatives" option on the very same node. It failed and I got the following messages:

* Unable to create scaled Thumbnail image
* The selected file /var/www/sites/8087/files/images/P9200563aO.thumbnail_0.jpg could not be copied, because no file by that name exists. Please check that you supplied the correct filename.
* The selected file /var/www/sites/8087/files/images/P9200563aO.preview.jpg could not be copied, because no file by that name exists. Please check that you supplied the correct filename.

* The derivative images for {image name} have been regenerated.
* The Image has been updated.

drewish’s picture

camus, if image_get_sizes() doesn't exists it sounds like you don't have the latest version of -dev. i'd committed that recently. i'll try to spend some more time later debugging your problem.

Camus-1’s picture

You're right, drewish. I didn't have the latest version of -dev.

But I now do, and we should be on the same page. Thanks.

Hetta’s picture

Applied the patch in #8 to the latest dev version of image.module.
It works a treat.

I'd love to see this committed - I'd tried the patch earlier, upgraded image to the latest version and have been wondering where that checkbox went.

drewish’s picture

Version: 5.x-1.x-dev » 6.x-1.x-dev
Status: Needs review » Fixed

i committed this to HEAD. i'm not going to backport it to the 1.x branch.

Anonymous’s picture

Status: Fixed » Closed (fixed)
cozzi’s picture

Status: Closed (fixed) » Active

You right, this "rebuild derivative images" is cryptic all right. After reading this thread I still not sure what it does, and if it's so useful why would I only use for certain images. Why is it not a default background feature that runs on every image upload.

There should at least be a link next to it that leads to a clear explanation.

sun’s picture

Category: support » feature
Status: Active » Closed (fixed)

If you think that it needs to be improved, then open a new issue.