Module works nicely for images you upload on an image field of a node, but when that field has a "default image" setting, it does not work, the (default) image is displayed "as is" without added inline width/height styles.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | default.png | 19.34 KB | rv0 |
Comments
Comment #1
rv0 commentedcorrecting title
Comment #2
mikey_p commentedUnfortunately, this module can't do anything about the default formatter, since that has no image style applied to it.
The default option basically means "display this file exactly as it was uploaded, without any changes whatsoever"
Comment #3
rv0 commentedI'm not talking about the "default" formatter
I'm talking about the default image setting on an image field:

Comment #3.0
rv0 commentedUpdated issue summary.
Comment #4
rv0 commentedComment #6
mikey_p commentedSo the problem here is actually in Drupal core. For some reason, default images don't have a height/width set at all when loaded from the database and when run through theme_image_style this fails to produce a transformed height/width. This means the resulting image tag is presented without height/width attributes in the image tag, and then it fails back to the browser to determine how to scale the image.
I'll see if I can find a core bug for this.
Comment #7
mikey_p commentedI just reopened #1129642: Populate HTML image tags with dimension attributes (like D6 imagefield) without re-introducing I/O to see if we can get the fix from D8 backported to D7.
Comment #8
astonvictor commentedD7 reached its EOL back in January 2025, and there is no active release for D7 for this module anymore.
Development or support is not planned for D7. All D7-related issues are marked as outdated in a bunch.