Last updated on
17 May 2021
Issue
How does Scene7 support retina displays with viewers? And, how can I call an HD image in an HTML5 viewer?
Solution
For all image-based viewers, there's a viewer modifier that allows you to control use of higher-pixel images for retina displays.
See this information from in Scene7 Help, with an excerpt about the zoom viewer:
ZoomView.enableHD
[ZoomView.|<containerId>_zoomView.]enableHD=always|never|limit[,number]
- always|never|limit: Enable, limit, or disable optimization for devices where devicePixelRatio is greater than 1. That is, devices with a high-density display like iPhone4 and similar devices. If active, then the component limits the size of the Image Serving image request as if the device only had a pixel ratio of 1 and that way reducing the bandwidth.
- number: If using the limit setting, the component enables high pixel density only up to the specified limit.
- Properties: optional.
- Default: limit,1500
Example:
enableHD=always
- If set=always, then the pixel density of the screen/device is always taken into account. So, if
- Screen pixel density = 1, then the image requested is 1000 x 1000
- Screen pixel density = 1.5, then the image requested is 1500 x 1500
- Screen pixel density = 2, then the requested image is 2000 x 2000
- If set=never, it will always use pixel density of 1 and ignore the device's HD capability. Therefore, the image requested is always 1000 x 1000.
- If set=limit<number>, Scene7 requests at device pixel density and serves only if the resulting image is below the specified limit:
- If the limit number is 1600, and pixel density is 1.5, then Scene7 serves the 1500 x 1500 image
- If the limit number is 1600, and pixel density is 2, then Scene7 serves the 1000 x 1000 image. (The 2000 x 2000 image exceeds the limit.)
- This limit number applies to either the width or height.
- This limit number works in conjunction with the company setting for maximum size image. As best practice, it is ideal to set limit number = company max size setting.
- Those scenarios above apply to the initial and reset image request. Once zoomed in, Scene7 uses the image tiles.