使用媒体查询为不同的设备使用两个图像集是一种好习惯吗?

Is it good practice to use two image sets for different devices using media queries?

我正在尝试制作一个摄影简历类型的网站,但遇到了这个问题,即使用横向图像并使其对移动设备负责并不好,因为一些更好的细节会丢失,桌面和纵向反之亦然。我想知道必须为移动设备和台式机制作图像资产并通过媒体查询相应地显示它们

简答:

yes

为什么?

because on smaller screens you have different orientation, eg. not landscape. Also you dont need to spend resources loading an image with x amount of pixels when the smaller screen can only display y amount. Also when exceeding a Z amount of pixels the eye will not be able to tell the difference, thereby smaller images = good.

另请查看此link 图像最佳做法

https://developers.google.com/web/fundamentals/performance/optimizing-content-efficiency/image-optimization

也看看如何提问

https://whosebug.com/help/how-to-ask