Hi,
since Drupal 7.9 the image dimensions are back in the html rendering of image tags. To support this, you seem to have to add a 'dimensions callback' to the function filtersie_image_effect_info().
Hi,
since Drupal 7.9 the image dimensions are back in the html rendering of image tags. To support this, you seem to have to add a 'dimensions callback' to the function filtersie_image_effect_info().
Comments
Comment #1
Wolfgang Reszel commentedMore infos: http://drupal.org/node/1353920
Comment #2
jstollerI second this. I just spent several hours trying to figure out why dimensions weren't showing up on my images and finally traced it back to this module. Unfortunately, I have some jQuery that relies on those dimensions being there.
Comment #3
nils.destoop commentedI was busy with this, but then saw that the dimensions callback doesn't pass the file info. Because of this, it's impossible to know which crop selection needs to be loaded.
Anyone knows a trick for this?
Comment #4
Speicus commentedIt seems there is an issue and a patch for this:
#1364670: ImageStyle::transformDimensions unable to deal with all effects.
Comment #5
ianthomas_ukAn incomplete and disabled fix for this was committed for some reason, I've removed that fix in http://drupalcode.org/project/imagecrop.git/commitdiff/75ecbca1c277cc0f2...
Comment #6
bburgRe: #4, that is an 8.x core issue. Perhaps I am a bit confused on where the complexity is here. We just need something to set the dimensions, right? So:
imagecrop_image_effect_info() should add
and the callback is as simple as:
While this doesn't appear to set the native height and width properly, it at least sets the height and width properties of my image elements, which fixes a lot of heardache that's happened after a recent update to media.