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.

CommentFileSizeAuthor
#3 default.png19.34 KBrv0

Comments

rv0’s picture

Title: In not work on default images » Does not work on default images

correcting title

mikey_p’s picture

Status: Active » Closed (works as designed)

Unfortunately, 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"

rv0’s picture

Status: Active » Closed (works as designed)
StatusFileSize
new19.34 KB

I'm not talking about the "default" formatter

I'm talking about the default image setting on an image field:
default.png

rv0’s picture

Issue summary: View changes

Updated issue summary.

rv0’s picture

Status: Closed (works as designed) » Active

Status: Closed (works as designed) » Active
mikey_p’s picture

Issue summary: View changes
Status: Active » Postponed

So 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.

mikey_p’s picture

astonvictor’s picture

Status: Postponed » Closed (outdated)

D7 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.

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.