If I'm right, ImageField creates automatically thumb files of uploaded images and places them in the same folder as the full size image. They are named UPLOADEDIMAGE.jpg.thumb.jpg

Is it possible to create them in a subfolder or different folder in general? Would be cool, if you could provide a path setting for this thumb images and not only for the uploaded images.

CommentFileSizeAuthor
#7 imagefield_new_thumbnails.patch5.45 KBquicksketch
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

no2e’s picture

*bump*

No idea/tip/help? I want to publish the website, and then many, many images will come in. Would love to fix it before that.

no2e’s picture

No way?

thePanz’s picture

If you can code: look for imagefield_file_admin_thumb_path() function in imagefield_file.inc and try to manage it with a config in the Admin section. Shouldn't be too hard!

Regards

notabenem’s picture

In addition, these files are completely useless if someone uses ImageCache.
It would be great, if enabling ImageCache would automatically disable the generation of these .thumb. files.

Zach Harkey’s picture

I understand the need for a default thumbnail derivative to display in the administrative form. The old way of optically scaling down the original image caused all kinds of problems e.g. in nodes with several very large original images.

However, I completely agree with the previous posters about the non-configurable hardcoded ".thumb.jpg" style thumbs in the same directory. One of my main reasons for dumping the Image module was because of its insistence on automatically creating a minimum of three images for each original and insisted on keeping them in the same directory.

Imagecache provides such an elegant way around that kind of mess. We should use Imagecache to create these thumbnails or not do it all.

- If you don't have Imagecache installed, your thumbnail is simply the original file, optically scaled to look like a thumbnail. This should be perfectly acceptable for the beginner level user who doesn't have Imagecache installed.

- If you do have Imagecache installed, you can specify a derivative to use in the field settings form. Or Imagefield could just automatically generate a derivative for this use.

This would also mitigate the problem of all the missing ".thumb.jpg"-style thumbnails after attempting to upgrade from Imagefield 5.x. As it stands now, these image paths are completely broken in the admin form.

drewish’s picture

Category: support » feature

There's no way to configure it. I'm not that interested in adding the feature personally.

quicksketch’s picture

Title: It creates *.thumb.jpg files in the same folder » Move *.thumb.jpg files to a separate directory for thumbnails
Status: Active » Needs review
FileSize
5.45 KB

This does irritate me quite a bit also. I've written the attached patch which moves all thumbnails to [files]/imagefield_thumbs/[original path], similar to ImageCache's approach.

This patch also changes the way things work by generating images when they are shown in the preview, rather than generating images when files are uploaded. Generating on upload had the odd side-effect of generating images even when they weren't necessary (like when they're uploaded through a FileField widget).

As a small bonus and keeping #305621: Imagefield configurable upload thumbnail size and #402014: Use imagecache for thumbnails in mind, I made a variable for the imagefield preview size, though this is not configurable through the UI. I think it's nice to give advanced admins the option to change this through settings.php or variable editing, but most site administrators will use the ImageCache option once that becomes available.

quicksketch’s picture

Title: Move *.thumb.jpg files to a separate directory for thumbnails » Move *.thumb.jpg files to a separate directory
Version: 6.x-3.0-alpha2 » 6.x-3.0-alpha4
Status: Needs review » Fixed

In the name of getting out a better version of ImageField, I've committed the above patch. I tested both public and private files and the upgrade path a few times over, everything seems to be working swimmingly. Please post any problems with the new approach.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.