Is there any way, other than hacking the module, to add more than 3 blank custom sizes in:
Administer --> Site Configuration --> Images --> Image Sizes
I found a way to do it by hacking image.admin.inc, ln 53:
// Add some empty rows for user defined sizes.
//CHANGE 6 TO n FOR ADDITIONAL SIZES
for ($i = count($sizes); $i < 6; $i++) {
$sizes['new'. $i] = array(
'label' => '',
'operation' => 'scale',
'width' => '',
'height' => '',
'link' => IMAGE_LINK_SHOWN,
'new' => TRUE,
);
}
obviously this isn't desired, but the Image module will create the additional sizes in /sites/default/files/images, however they are will not display correctly when the image is viewed as a Node, at say, drupal/node/20.
Anybody have a better fix for this?
Comments
Comment #1
Robbie Sternenberg commentedI was just looking into this as well, and I'm going to submit a patch for D5, but the code is exactly the same as D6.
As for the image sizes not being shown in the node view, this is due to the size of the images themselves. If you specify a custom size that is larger than the image you upload, then the image module simply sets the value of the filename for the larger size to the original image's filename. Since the image_link() function doesn't print sizes that have filenames that equal your request, if you click on the "original" size, or on a derivative size that has the original filename set as its filename, then any size with the original as its filename will not be shown.
Comment #2
sunMarking as duplicate of #357890: Allow more image size presets