Skip to Content
Author's profile photo Konstantin Anikeev

Retina support for sap.m.Image

Found an interesting feature in OpenUI5.

If you use a device with retina display and component sap.m.Image with src=”your_image.png” OpenUI5 tries additionally to load “your_image@2.png” and show it instead of original image.

From official Doku:

Density related image will be loaded if image with density awareness name in format [imageName]@[densityValue].[extension] is provided. The valid desity values are 1, 1.5, 2. If the original devicePixelRatio isn’t one of the three valid numbers, it’s rounded up to the nearest one.

That’s cool!!!

Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.