Google Storage but the image is broken. 
Any ideas how to go about this?
Hello. Is it broken in general, or just when using react-to-print? Can you please share a codesandbox example if possible? Thanks
When using react-to-print the external image from GCP storage links dont show up it instead shows just a broken image link.. Will try to reproduce in a codesandbox
Yeah, if you could make a working codesandbox that would be fantastic, thank you
Hey @MatthewHerbst I couldnt replicate it on CodeSandbox so i screen recorded it instead, apologies for the screen size

Here is the image link that was generated https://storage.googleapis.com/elliot-images-us/production/842/lookandfeel/SLxB_FullLogo-02.png
Screen record link for the video - https://recordit.co/TlghI5Dc4K
I don't see you opening the print window in that video? I really can't do much to investigate without a reproducible example unfortunately.
The issue happens when you don't give DOM enough time to load the image once it has the src set. stackoverflow
A quick hack is to download the image blob then convert it to image URL, in advance. Then use it on the print content.
fetch(
'image-url')
)
.then(function(response) {
return response.blob();
})
.then(function(blob) {
var urlCreator = window.URL;
var imageUrl = urlCreator.createObjectURL(blob);
setImageLogo(imageUrl);
});
}
Thanks a lot @p8ul that solved it.. Thanks also @MatthewHerbst for the time
Glad that got figured out, thank you
Most helpful comment
The issue happens when you don't give DOM enough time to load the image once it has the src set. stackoverflow
A quick hack is to download the image blob then convert it to image URL, in advance. Then use it on the print content.
fetch( 'image-url') ) .then(function(response) { return response.blob(); }) .then(function(blob) { var urlCreator = window.URL; var imageUrl = urlCreator.createObjectURL(blob); setImageLogo(imageUrl); }); }