tub
October 6, 2021, 9:12am
1
on my back-end i use Dropzone for uploading the files, but also for displaying already uploaded files.
let productImageUrl = 'https://imagedelivery.net/account-tag/image-id/public'
myDropzone.displayExistingFile(productImage, productImageUrl, null, 'anonymous');
it can set the crossOrigin attribute of the html object object (4th param)
above code works when picsum url’s are used
thisDropzone.displayExistingFile(productImage, 'https://picsum.photos/200', null, 'Anonymous');
the productImageUrl works when loaded inside a html image tag or directly but not when it’s loaded via javascript, what CORS thing am i missing here?
tub
October 6, 2021, 9:20am
2
actual error:
for each image trying to load this way
tub
October 6, 2021, 10:14am
4
it seems te be common when using the Cloudflare Image Url’s with javascript gallery/lightbox tools. Featherlight example:
tub
October 6, 2021, 2:58pm
5
ok, after debugging it seems the following “works”
Featherlight lightbox works if i specify type: 'image'
in the gallery init
Dropzone displayExistingFile works if i specify thumbnails=false
within these boundaries things seem to work without extra CORS stuff, i think it is something with detecting the image filetype on the cloudflare image url’s
system
Closed
October 21, 2021, 9:13am
6
This topic was automatically closed after 15 days. New replies are no longer allowed.