Requesting an image seems slow

Hi, wanted to ask this to understand if there is a way to optimize the speed at which we get images from gadget via a direct URL. At the moment it seems quite slow, so I wanted to ask: are there any options we can attach via the URL so that we get images faster. After looking at the chrome dev tools, I can see that it takes 800ms-1s for a server response. In total the request took 1-1.3 seconds. I noticed this is happening on both the embedded frontend and post-purchase extension. Of course, image size is very minimal for optimized download speeds. Thanks.
7 Replies
Chocci_Milk
Chocci_Milk•4w ago
Hello, The response of the server really depends on where you're located. What assets are you trying to load? If they're simply being used in your frontend, you shouldn't have a problem as they'll be loaded with the rest of the code. Are you using Remix/RRv7 SSR?
Emil
EmilOP•4w ago
Hey, I am simple trying ot load .JPG or .PNG images through a direct URL. No SRR, just plain React and an image element with src attribute. I am located in London.
Chocci_Milk
Chocci_Milk•4w ago
Are you importing the image into your file code or making an http request to fetch the image?
Emil
EmilOP•3w ago
Hey apologies for the late answer. We fetch the file/image from the database and get the URL. Using this URL we make an HTTP request for it 🙂
Chocci_Milk
Chocci_Milk•3w ago
Where abouts are you located? I feel like this has to do with the distribution of assets
Emil
EmilOP•3w ago
I am in London, and some users are in Bulgaria. However, most of our future customers should be located in the US, but at the moment I don't have a way to test the loading times from there.
Chocci_Milk
Chocci_Milk•3w ago
Ok, I think that the issue is definitively where our database is + distribution of assets. Let me see what we can do here

Did you find this page helpful?