Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Image 5.x-2.0-alpha3
Image assist 5.x-2.x-dev
Lightbox2 5.x-2.x-dev
I am using image assist to insert images with the wysiwyg editor.
The settings on image node settings appear to work fine for the original image presets, "Original, Thumbnail, & Preview".
Custom Presets work oddly, either not being handled or linking to themselves in lightbox and not the Lightbox image display size.
The settings for Image Assist images do not seem to have any affect.
It also would be nice, to have additional settings for display size, based on the trigger.
Comment | File | Size | Author |
---|---|---|---|
#7 | 303780_img_assist_custom_sizes.patch | 867 bytes | fenstrat |
Comments
Comment #1
dman CreditAttribution: dman commentedIIRC, lightbox does some guesswork - clientside - to calculate the desired filename based on the trigger link or filename.
Basically swapping blah/mypic.thumbnail.jpg into blah/mypic.preview.jpg - although the configs try to pass the appropriate logic through to the js.
How are your presets named, and what does the failing view-source trigger look like (paste the HTML in [code] tags) and let us know what it SHOULD be requesting.
Comment #2
sgriffin CreditAttribution: sgriffin commentedOddly enough the custom preset is now working. After removing it, adding it back and selecting it again.
Custom sizes, do not display however.
Image Assist custom size handler is set to lightbox grouped
Not working.
If I set the class in custom classes, lightbox activates, but with no target.
The custom preset is working as
View Image Details]'>
Comment #3
sgriffin CreditAttribution: sgriffin commentedOddly enough the custom preset is now working. After removing it, adding it back and selecting it again.
Custom sizes, do not display however.
Image Assist custom size handler is set to lightbox grouped
Not working.
Comment #4
stella CreditAttribution: stella commentedI think this is because the class name on the image is
image-img_assist_custom-75x50
instead of the normalimage-img_assist_custom
. Did you do something to change the default class name? This also appears in the filename, which is why it's not working.Cheers,
Stella
Comment #5
stella CreditAttribution: stella commentedIt's actually an issue caused by the 5.x-2.x-dev version of img_assist. I've opened an issue on it here: #303945: Add consistent CSS class name for custom sized images I'll need that issue first before lightbox2 will work.
Cheers,
Stella
Comment #6
Robbert CreditAttribution: Robbert commentedAfter having fixed the classname issue in img_assist it seems to work, but there are two issues:
Comment #7
fenstratI'm not sure about the 5.x-2.x version but this is also effecting the 6.x-1.x version so moving there. Also this depends on #303945: Add consistent CSS class name for custom sized images which is a 6.x issue.
Attached is a fix for auto_image_handling.js not correctly rewritting the src tag.
Basically img_assist creates img src files for custom images in the format
image-name.img_assist_custom-150x100.jpg
where 150 is the width and 100 is the height of the custom image. When auto_image_handling.js rewrites the src tag it doesn't take account of the "-widthxheight". The patch adds this to the regex.Note: this patch also depends on img_assist outputting consistent classes to custom sized images as per #303945-21: Add consistent CSS class name for custom sized images
#6 point 1: I can't replicate that, when does it show up?
Comment #8
Sunil Mohan CreditAttribution: Sunil Mohan commentedWhen both patches are applied, everything works fine for me except "Download Original" is linked to "http://example.com/content/null".
Comment #9
stella CreditAttribution: stella commentedCommitted, along with a workaround for #303945: Add consistent CSS class name for custom sized images
Comment #10
fenstratThanks stella!