You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A while back we had a platform image helper, which would use JavaScript to serve different images based on operating system (e.g. Windows, macOS, Linux). That code no longer exists today, but there have been a couple of requests recently where this kind of functionality would have been useful again.
Reinstating a helper like this today would likely be a little more complex, since we now often serve responsive images and not just 2x high-res versions. We could either create a new, special helper just for this use case, or alternatively update resp_img() with some new functionality. Adding data attributes like data-srcset-win and data-srcset-mac etc, which could be swapped out with srcset using JS might work.
The text was updated successfully, but these errors were encountered:
Description
A while back we had a platform image helper, which would use JavaScript to serve different images based on operating system (e.g. Windows, macOS, Linux). That code no longer exists today, but there have been a couple of requests recently where this kind of functionality would have been useful again.
Reinstating a helper like this today would likely be a little more complex, since we now often serve responsive images and not just 2x high-res versions. We could either create a new, special helper just for this use case, or alternatively update
resp_img()
with some new functionality. Adding data attributes likedata-srcset-win
anddata-srcset-mac
etc, which could be swapped out withsrcset
using JS might work.The text was updated successfully, but these errors were encountered: