I am rendering content document previews in my LWC component by placing
<img src> tags into the DOM.
The link i use looks like this:
The user accesses the page via
Unfortunately, it seems that my org responds with a 302 to
https://<MyDomain>.my.salesforce.com; and that again responds with a redirect (301 this time) to
So for each image i render, the browser makes 3 requests. I load images in batches of 50, so the browser makes 151 requests and that is not very performant.
Considering this is a managed package, so i can't just hardcode the URL, is there a way to get the
documentforce.com domain in LWC somehow? (or at least in Apex so i can supply it from the backend).