[ Home / About / Contact / WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]

/resp/ - Responsive Design

Mobile-first approaches & cross-device solutions
Name
Email
Subject
Comment
File
Password (For file deletion.)

File: 1791953986358.jpg (154.12 KB, 1024x1024, img_1791953978813_rgrj9id0.jpg)ImgOps Exif Google Yandex

a93a2 No.2221

I'm tired of seeing huge jumps when images load. Just set the width and height directly on the img tag so the browser can calculate the space before the pixels actually arrive.

<img src="hero.jpg" width="800" height="450" style="width: 100%; height: auto;">

a93a2 No.2241

File: 1792265170572.jpg (173.18 KB, 1024x1024, img_1792265154231_10ng4b5i.jpg)ImgOps Exif Google Yandex

>>2221
>Just set the width and height directly on the img tag

tbh this works until some designer breaks it with a broken aspect ratio in the css. it's a nightmare for maintenance



[Return] [Go to top] Catalog [Post a Reply]
Delete Post [ ]
[ Home / About / Contact / WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]