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.
Sorry if this is not a right place to ask, but it would be very useful to have an option to resize image without having "width" and "height" inside tag. For example, if user posts a huge image and is not setting it's attributes, it will break a layout almost certainly. To prevent this I propose to add the "width" and "height" settings by which to resize such images.
Any comments would be appreciated.
Comment | File | Size | Author |
---|---|---|---|
#5 | image_resize_filter_predefined.png | 76.86 KB | jcisio |
Comments
Comment #1
quicksketchAn interesting suggestion. Image Resize Filter is largely intended to improve the WYSIWYG experience, this would work opposite that goal since it would make what the WYSIWYG shows and what the front-end view shows different. However I can definitely see how this would be a very useful option when using Image Resize Filter and not using a WYSIWYG.
If we were to add this option, I would opt for only specifying a "default width" and scaling the height proportionally.
Comment #2
v8powerage CreditAttribution: v8powerage commentedIn my case (I'm using BUEditor) and I predefined width for images to 320px, unfortunately users are clever enough to delete this or alter to say 1000px, so it would be great if this option would disregard user specified size, resizing it as I wish.
Comment #3
quicksketch-Shaman-: your particular situation I'm not particularly interested in correcting. Image Resize Filter is intended to resize based upon the size the user entered, not modify it once it's been set.
Comment #4
v8powerage CreditAttribution: v8powerage commentedI found easy solution.
In style.css:
.content img {
max-width: 320px
}
Comment #5
jcisio CreditAttribution: jcisio commentedIsn't this what I mentioned before? #672770: Default size by alignment
The idea is to use a predefined width or preset when the align tag is set to left/right/center (center or undefined). A "predefined width" is exactly what imagecache does, and it does much better.
Comment #6
quicksketchYes, and as I've said before, I'm not interested in adding it. :P