#ReactNative - render static image at intended size on development and release build

I noticed that on React Native Maps, my custom image map markers were rendered a few times bigger in a release build compared to while in development exactly like this Custom marker icons are too big on release issue on React Native Maps's repo.


To make sure that the markers render at the intended dimensions, you have to provide images at 2x and 3x times your original image size. Let's say the image(logo.png) that you want to use is at 20px * 20px (width * height). You will have to provide 40px * 40px and 60px * 60px and name them as logo@2x.png and logo@3x.png. These suffixes will let native platform know which images to use for different screen densities.

Refer to React Native Image document for more information.

React Native Image document
React Native Image document

Thanks for reading!