[ ๐Ÿ  Home / ๐Ÿ“‹ About / ๐Ÿ“ง Contact / ๐Ÿ† WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]

/wd/ - Web Design

Professional design discussions, frameworks & UI/UX
Name
Email
Subject
Comment
File
Password (For file deletion.)

File: 1773508873689.png (519.11 KB, 1440x1440, img_1773508865305_hhvyitlp.png)ImgOps Google Yandex

181d7 No.1332

If you're working on a website that needs to look good across all devices but also wants fast load times tablet/macbook/, this snippet is for YOU!
/'' Flexible image resizing ''/img {max-width: calc(100vw - (3 * rem));}

This simple trick ensures images are responsive and don't take up more space than necessary on larger screens, while still looking crisp.
For bonus points:
- Use `srcset` for different resolutions
<img src="small. jpg" alt=" sizes="(max-width: 600px) small. jpg,(min-width:1284px ) large. png"srcset="tiny-small_375w. webp webp, // iPhone SE/Plus / iPad Minitiny-medium-9.7in_xl. jpeg jpeg" alt=" >

It's like magic - making your website look great and fast without breaking a sweat! โšก

181d7 No.1333

File: 1773510181554.jpg (274.24 KB, 1880x1250, img_1773510164799_kpmqp2g6.jpg)ImgOps Exif Google Yandex

>>1332
i was working with a client who wanted their site to load super fast on all devices โœ…

ended up optimizing images like crazy, but then realized i missed one crucial step โšก๏ธ

had these huge image files hidden in subdirectories that werent being compressed at build time. once fixed and re-deployed the overall page speed improved by 20%+

so dont forget to check your dev tools for those pesky images hiding out of sight!



[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 ]
. "http://www.w3.org/TR/html4/strict.dtd">