react-native-image-resizer icon indicating copy to clipboard operation
react-native-image-resizer copied to clipboard

What should it be the best Image resolution for my app (QUESTION)

Open felire opened this issue 4 years ago • 2 comments

Hi, I have a question. In my app the user can take some pictures or upload pictures from the gallery. I want to resize the image that the user will upload but I don't know what is the optimus size. For example what I thought is to take the resolution of the image in the bigger device, and upload that resolution and doing that it will be fine in all resolutions. But I'm not sure, in how many aspect ratios should I upload the image? How many sizes?

felire avatar Jun 29 '20 13:06 felire

I think we are going to upload only one image and then the server will resize to the other sizes. But, what are the sizes that the server should resize? And what is the optimus size for the first resize? For the image that will be uploaded from the phone to the server

felire avatar Jun 29 '20 13:06 felire

@felire I have my images auto-resized on the server to 800x800, 400x400, 200x200, and 50x50. Images in react-native can take an array of sources, and if you give each source a height and width, react-native will choose the smallest size that is still larger than the dimensions of the Image component itself.

<Image source={[{uri: 'a.com/pretty_200.jpeg', height: 200, width: 200}, {uri: 'a.com/pretty_400.jpeg', height: 400, width: 400}]} />

krewllobster avatar Jul 31 '20 14:07 krewllobster

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Sep 01 '22 19:09 stale[bot]

This issue has been automatically closed. Thank you for your contributions.

stale[bot] avatar Sep 09 '22 04:09 stale[bot]