image_resize_filter ignores measurements, even if dimension is set in percentages.

<img src="some path" style="width:100%;height:100%"/>

At this example image will be resized to 100px/100px. That's wrong because here I want to scale image according users view port size. I think filter should leave images as it is if measurements defined for any of dimensions.

I've made small patch overcoming this problem for variant with percentages. But fix should be more complex. :)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

CoPut’s picture

quicksketch’s picture

Thanks, you're right of course that Image Resize Filter shouldn't modify images that are not in pixels. We should be able to update our regexs to ignore such images.

quicksketch’s picture

Status: Active » Fixed
FileSize
1.75 KB

I've committed this patch which accomplishes the same thing as your patch in #1 only it still pulls in remote files locally even if they don't need to be resized.

quicksketch’s picture

Title: image_resize_filter ignores measurements, even if dimension is set in percentages » Do not resize images that specify height or width in percentages

Status: Fixed » Closed (fixed)

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