Closed (works as designed)
Project:
ImageField
Version:
6.x-3.0-rc1
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
4 Apr 2009 at 15:50 UTC
Updated:
6 Feb 2010 at 21:26 UTC
My website needs thumbnails instead of full images on teasers, therefore I'm submitting the following patches for review.
This approach uses the default thumbnail generated when images are uploaded (imagefield_admin_thumbnail).
Advantages over http://drupal.org/node/101748:
| Comment | File | Size | Author |
|---|---|---|---|
| imagefield_formatter.inc_.patch | 1.17 KB | ragethread | |
| imagefield.module.patch | 1.54 KB | ragethread | |
| imagefield.install.patch | 1.64 KB | ragethread |
Comments
Comment #1
quicksketchI've been pondering over this issue while it's been in the queue. I'm not sure I want to add it. ImageField's primary purpose is just getting images into the site. The thumbnail provided is intended for administration use only (hence why the directory is called "imagefield_admin_thumbs"). If we provide users with a built-in way to do thumbnails, its inevitable that users are going to ask for different thumbnail sizes or multiple thumbnail sizes, because it's "easy" and "built-in". ImageCache is clearly a superior solution, and having a single hard-coded thumbnail size is going to lead users to think there's some way to make more thumbnails with just ImageField.
The admin-thumbnail does not account for a lot of things that ImageCache does, such as generating one image at a time. If you were to visit a page generated with Views, that had 50 thumbnails on it generated directly using this approach, Drupal would need to generate all 50 images simultaneously in a single request, probably exceeding the maximum PHP run time. The same page using ImageCache would generate 50 separate requests to generate the images, so if one fails, that image is just a broken image but the rest of the page loads just fine.
My general feeling is that the thumbnail is intended for administrative purposes and that we should keep it that way. Display problems are extremely frequent (see the ImageCache queue), and I don't want ImageField to be responsible for more functionality than it already is.
Comment #2
quicksketchI'm marking this as by design. ImageField is meant to be an uploading field and not necessarily a display mechanism. Note that the D7 image.module that I'm working on will merge ImageCache and ImageField together, so at least this will be accommodated for in the future in the future of Drupal.
Comment #3
Ela commentedThis would be a great feature.. the images are generated anyway.. so why not use them? :)
Would these patches work for imagefield-6.x-3.2 ?