Forums

Why do the images on my Flask app load up slower on mobile devices?

Not only do they appear slower but it does this thing where the screen cuts temporarily cuts off when I scroll up and down in the photo's section? That only happens on mobile..

Does anybody know why this is happening?

You're probably serving really large images and then using the browser to scale them down. That means that you're downloading a lot of data and then using the processor on the client to scale it down. On mobile, with lower bandwidth, less memory and smaller processors, the effect of that will be more noticeable. Pre-scale your images to the size that they should be and serve them that way.