An image is being stretched or distorted rather than scaling naturally.
⚡ Quick Fix (TL;DR)
The Culprit: Both width and height are being forced to specific values that don't match the image's real aspect ratio.
The Fix: Let the image's width scale to its container while height adjusts automatically, preserving the original proportions.
.my-image {
width: 100%;
height: auto;
} Was this helpful? Thanks for the feedback!
Tagged in :
More from the field
Bisect to an Empty Baseline Before Trusting Any Single Theory
.
Multiple plausible-sounding theories for a bug each turned out to be wrong when actually tested – time was spent building fixes…
A Security Dashboard’s Activity Log Can Lag a Full Day Behind Real Time
.
Trying to check a security tool’s activity log for an event that had just happened showed nothing at all.