403 when retrieving an image

We’re using the Backendless Image Processor API to create a small avatar image (works), and then we retrieve a link to the (small, compressed) image and put this into ‘local storage’. The url in our test is:

https://backendlessappcontent.com/AE4235E1-DBB7-C6F0-FF4A-E0378B0B2B00/{API Key}/files/media/Thumbnails_small/-280944106.png

and accessing this image using any browser is no problem. When navigating around our pages, the image is in a reusable header component.

However: for each new page navigation, this tiny image loads very slowly, and in console we see a 403 error:

  1. https://media.licdn.com/dms/image/C4E03AQGjcYLBFQGhpw/profile-displayphoto-shrink_400_400/0/1613675425622?e=1676505600&v=beta&t=Zt2EJPP_nPkptHewj6S6kGRtN9ItQU--BTqHtZZ_MbQ

  2. Request Method: GET

  3. Status Code: 403

  4. Referrer Policy: strict-origin-when-cross-origin

Why is this happening?

Hi @Alex_Klein ,

At this point is hard to say what exactly went wrong.
Could you please create test page in which this problem also appears and post link to it here?

Regards, Andriy

Funny, the 403 error problem has now spontaneously disappeared (without us having made any changes). :grimacing:

However, the little avatar still seems to load relatively slowly when navigating across pages, even though we get the file url from local storage — which I imagine should be very fast. Would it be better to store the actual image (as base64 data) in local storage, so page load doesn’t have to find a file in our file system?

@Alex_Klein ,

Would it be better to store the actual image (as base64 data) in local storage, so page load doesn’t have to find a file in our file system?

You can try this approach and compare loading time of two variants. It is strange that browser doesn’t cache these static resources. I would advice to to investigate this absence of caching more closer.

Regards, Andriy

Hi Andriy, browser is now caching and things are fine. It’s apparently one of these days where things fix themselves… thanks for your consideration :grinning: