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_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. :)
Comment | File | Size | Author |
---|---|---|---|
#3 | image_resize_filter_percentage.patch | 1.75 KB | quicksketch |
#1 | dimentions_in_percentages-792400-1.patch | 1.66 KB | CoPut |
Comments
Comment #1
CoPut CreditAttribution: CoPut commentedComment #2
quicksketchThanks, 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.
Comment #3
quicksketchI'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.
Comment #4
quicksketch