0

i have deployed my express server on dreamHost vps. In my react native app, I have an image Gallary component showing 10 images per scroll but images are talking 10s+ to load.Similarly, video is also talking too much to load. enter image description here

Already followed this Node.js + Express.js very slow serving static files Here are some images from API img1 img2

Can anyone suggest to me how can I optimize it? Thanks in advance

Muhammad Sami
  • 520
  • 2
  • 8
  • 21
  • This is normal, you are using high quality and high volume photos, Decrease the quality of the photos and separate the requests separately, not all at once – Mohammad Yaser Ahmadi Feb 17 '21 at 14:10
  • i Can't reduce high volume. however Is there anyway to load low quality image on calling multiple images. Onclick of Image i am image in Model, so I want to load quality image for model but since it is only one it will not take time. so the question is how reduce quality of img when loading image with URL? – Muhammad Sami Feb 17 '21 at 16:03
  • Due to Node single-thread nature, I strongly recommend for you to delegate the task of service static files to another service such as nginx. Your system will perform better. – Firmino Changani Feb 17 '21 at 16:55
  • @Firmino any example or blog post that explain how to achieve that? – Muhammad Sami Feb 17 '21 at 18:32

0 Answers0