Merging Images Using Javascript/ReactFirebase Storage and Access-Control-Allow-OriginImage returned from REST API always displays brokenCreate GUID / UUID in JavaScript?How do JavaScript closures work?What is the most efficient way to deep clone an object in JavaScript?How do I remove a property from a JavaScript object?Which equals operator (== vs ===) should be used in JavaScript comparisons?How do I include a JavaScript file in another JavaScript file?What does “use strict” do in JavaScript, and what is the reasoning behind it?How to check whether a string contains a substring in JavaScript?How do I remove a particular element from an array in JavaScript?For-each over an array in JavaScript?

Checking if two expressions are related

Which sphere is fastest?

Adding command shortcuts to /bin

Would you use "llamarse" for an animal's name?

Latex & Markdown files

Endgame puzzle: How to avoid stalemate and win?

Feasibility of lava beings?

Can there be a single technologically advanced nation, in a continent full of non-technologically advanced nations?

History of the kernel of a homomorphism?

Prove that a definite integral is an infinite sum

As a GM, is it bad form to ask for a moment to think when improvising?

Can my 2 children, aged 10 and 12, who are US citizens, travel to the USA on expired American passports?

Python 3 - simple temperature program

Are there terms in German for different skull shapes?

Start job from another SQL server instance

Will 700 more planes a day fly because of the Heathrow expansion?

getline() vs. fgets(): Control memory allocation

chromatic descent on minor chord

What to use instead of cling film to wrap pastry

Should I mention being denied entry to UK due to a confusion in my Visa and Ticket bookings?

Are the Night's Watch still required?

What was Bran's plan to kill the Night King?

Is any special diet a treatment of autism?

Gerrymandering Puzzle - Rig the Election



Merging Images Using Javascript/React


Firebase Storage and Access-Control-Allow-OriginImage returned from REST API always displays brokenCreate GUID / UUID in JavaScript?How do JavaScript closures work?What is the most efficient way to deep clone an object in JavaScript?How do I remove a property from a JavaScript object?Which equals operator (== vs ===) should be used in JavaScript comparisons?How do I include a JavaScript file in another JavaScript file?What does “use strict” do in JavaScript, and what is the reasoning behind it?How to check whether a string contains a substring in JavaScript?How do I remove a particular element from an array in JavaScript?For-each over an array in JavaScript?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















I am creating a website in which each user has an "avatar". An avatar has different accessories like hats, facial expressions, etc. I have made this previously on a php website but I am using react to create this new website. I am loading in each users avatar and its item links from firestore. I do not want to
use absolute positioning or css, I want the avatar to be one image.



Example of what I am trying to achieve:
enter image description here



I found this library: https://github.com/lukechilds/merge-images which seems to be exactly what I need but I cannot load in external images or I get this error:



error img



Any solutions to this error or suggestions to an alternative would be greatly appreciated.



My code:



render() 

mergeImages([
'http://example.com/images/Avatar.png',
'http://example.com/images/Hat.png',
])
.then((b64) =>
document.querySelector('img.abc').src = b64;
)
.catch(error => console.log(error))
return (
...
<img class="abc" src='' width=100 height=200 alt="avatar"/>
...
);









share|improve this question






















  • are the images coming from a different domain than yours? that's probably what's happening

    – azium
    Mar 20 at 18:36











  • Yes they would be coming from a different domain, most likely firebase cloud storage. In these tests though I am just using random images from other sites. This is one of the main difficulties.

    – Perniferous
    Mar 20 at 18:37


















0















I am creating a website in which each user has an "avatar". An avatar has different accessories like hats, facial expressions, etc. I have made this previously on a php website but I am using react to create this new website. I am loading in each users avatar and its item links from firestore. I do not want to
use absolute positioning or css, I want the avatar to be one image.



Example of what I am trying to achieve:
enter image description here



I found this library: https://github.com/lukechilds/merge-images which seems to be exactly what I need but I cannot load in external images or I get this error:



error img



Any solutions to this error or suggestions to an alternative would be greatly appreciated.



My code:



render() 

mergeImages([
'http://example.com/images/Avatar.png',
'http://example.com/images/Hat.png',
])
.then((b64) =>
document.querySelector('img.abc').src = b64;
)
.catch(error => console.log(error))
return (
...
<img class="abc" src='' width=100 height=200 alt="avatar"/>
...
);









share|improve this question






















  • are the images coming from a different domain than yours? that's probably what's happening

    – azium
    Mar 20 at 18:36











  • Yes they would be coming from a different domain, most likely firebase cloud storage. In these tests though I am just using random images from other sites. This is one of the main difficulties.

    – Perniferous
    Mar 20 at 18:37














0












0








0








I am creating a website in which each user has an "avatar". An avatar has different accessories like hats, facial expressions, etc. I have made this previously on a php website but I am using react to create this new website. I am loading in each users avatar and its item links from firestore. I do not want to
use absolute positioning or css, I want the avatar to be one image.



Example of what I am trying to achieve:
enter image description here



I found this library: https://github.com/lukechilds/merge-images which seems to be exactly what I need but I cannot load in external images or I get this error:



error img



Any solutions to this error or suggestions to an alternative would be greatly appreciated.



My code:



render() 

mergeImages([
'http://example.com/images/Avatar.png',
'http://example.com/images/Hat.png',
])
.then((b64) =>
document.querySelector('img.abc').src = b64;
)
.catch(error => console.log(error))
return (
...
<img class="abc" src='' width=100 height=200 alt="avatar"/>
...
);









share|improve this question














I am creating a website in which each user has an "avatar". An avatar has different accessories like hats, facial expressions, etc. I have made this previously on a php website but I am using react to create this new website. I am loading in each users avatar and its item links from firestore. I do not want to
use absolute positioning or css, I want the avatar to be one image.



Example of what I am trying to achieve:
enter image description here



I found this library: https://github.com/lukechilds/merge-images which seems to be exactly what I need but I cannot load in external images or I get this error:



error img



Any solutions to this error or suggestions to an alternative would be greatly appreciated.



My code:



render() 

mergeImages([
'http://example.com/images/Avatar.png',
'http://example.com/images/Hat.png',
])
.then((b64) =>
document.querySelector('img.abc').src = b64;
)
.catch(error => console.log(error))
return (
...
<img class="abc" src='' width=100 height=200 alt="avatar"/>
...
);






javascript reactjs image image-processing






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 20 at 18:26









PerniferousPerniferous

228214




228214












  • are the images coming from a different domain than yours? that's probably what's happening

    – azium
    Mar 20 at 18:36











  • Yes they would be coming from a different domain, most likely firebase cloud storage. In these tests though I am just using random images from other sites. This is one of the main difficulties.

    – Perniferous
    Mar 20 at 18:37


















  • are the images coming from a different domain than yours? that's probably what's happening

    – azium
    Mar 20 at 18:36











  • Yes they would be coming from a different domain, most likely firebase cloud storage. In these tests though I am just using random images from other sites. This is one of the main difficulties.

    – Perniferous
    Mar 20 at 18:37

















are the images coming from a different domain than yours? that's probably what's happening

– azium
Mar 20 at 18:36





are the images coming from a different domain than yours? that's probably what's happening

– azium
Mar 20 at 18:36













Yes they would be coming from a different domain, most likely firebase cloud storage. In these tests though I am just using random images from other sites. This is one of the main difficulties.

– Perniferous
Mar 20 at 18:37






Yes they would be coming from a different domain, most likely firebase cloud storage. In these tests though I am just using random images from other sites. This is one of the main difficulties.

– Perniferous
Mar 20 at 18:37













2 Answers
2






active

oldest

votes


















0





+100









The merge-images package has some quirks. One of those quirks is that it expects individual images to either be served from your local server (example: http://localhost:3000/images/head.png, http://localhost:3000/images/eyes.png, and http://localhost:3000/images/mouth.png) or that those individual images be imported into a single file.



Working example: https://github.com/mattcarlotta/merge-images-example (this example includes the first three options explained below with the fourth option utilizing the end result of using a third party CDN)



To run the example, clone the repo:



git clone https://github.com/mattcarlotta/merge-images-example


Change directory:



cd merge-images-example


Then install dependencies:



yarn install


Then run the development server:



yarn dev


Option 1:
The simplest implementation would be to import them into a AvatarFromFiles component. However, as written, it isn't reusable and isn't suitable for dynamically selected avatars.



Option 2:
You may want to serve them from the local server like the AvatarFromLocalServer component with a Webpack Dev Config. Then you would retrieve stored strings from an API and pass them down into from state into the component. Once again, this still requires the images to be present in the images folder, but more importantly, it isn't ideal for a production environment because the images folder must be placed outside of the src folder to be served. This could also lead to security issues. Therefore, I don't recommend this option at all.



Option 3:
Same as Option 1, but lazy loaded like the AvatarFromLazyFiles component and therefore flexible. You can load images by their name; however, it still requires that all of the images be present upon runtime and during production compilation. In other words, what you have on hand is what you get.



Option 4:
So... the ideal option would be to build an image microservice or use a CDN that handles all things images (uploading, manipulating/merging, and serving images). The client would only be able to select/upload new images to this microservice/CDN, while the microservice/CDN handles everything else. This may require a bit more work but offers the most flexibility, super easy to implement, and best performance -- as it offloads all the work from the client to the dedicated service.



In conclusion, unless you plan on having a set amount of images, use option 3, otherwise option 4.



enter image description here






share|improve this answer

























  • Thank you! This is great. Unfortunately option 4 is not quite feasible for my current structure but I made it work with Lazy Loading like you showed in the example.

    – Perniferous
    Mar 25 at 20:15


















1














Problem



This is a CORS issue. The images are coming from a different origin that's not your server.



If you look at the source of the library, you'll notice it's using a <canvas> under the hood to merge the images, and then getting the resulting data. Canvas cannot work with images loaded from another domain. There's good reasoning behind this. In essence, loading an image into a canvas is a way to fetch data, and since you can retrieve the data from the canvas as base64, a malicious one could steal information by first loading it into a <canvas> and then pulling it out.



You can read about it directly from the spec for the <canvas> element.



Solution



You need to serve the images either from the same origin (essentially, the same domain) or include Access-Control-Allow-Origin: ... on the HTTP headers that serve the images. There's ways to do this in firebase storage, or other server solutions you might use.






share|improve this answer























  • It is indeed a CORS issue. Access-Control-Allow-Origin doesn't seem to work when I try everything in that thread you referenced.

    – Perniferous
    Mar 25 at 20:14






  • 1





    Huh. Did you confirm the images are being served with a lax Access-Control-Allow-Origin? You can check in the Network tab on the browser. Edit: just noticed you commented above that you got it working. Happy to hear!

    – Kevin Chavez
    Mar 28 at 13:50












Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55267789%2fmerging-images-using-javascript-react%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes









0





+100









The merge-images package has some quirks. One of those quirks is that it expects individual images to either be served from your local server (example: http://localhost:3000/images/head.png, http://localhost:3000/images/eyes.png, and http://localhost:3000/images/mouth.png) or that those individual images be imported into a single file.



Working example: https://github.com/mattcarlotta/merge-images-example (this example includes the first three options explained below with the fourth option utilizing the end result of using a third party CDN)



To run the example, clone the repo:



git clone https://github.com/mattcarlotta/merge-images-example


Change directory:



cd merge-images-example


Then install dependencies:



yarn install


Then run the development server:



yarn dev


Option 1:
The simplest implementation would be to import them into a AvatarFromFiles component. However, as written, it isn't reusable and isn't suitable for dynamically selected avatars.



Option 2:
You may want to serve them from the local server like the AvatarFromLocalServer component with a Webpack Dev Config. Then you would retrieve stored strings from an API and pass them down into from state into the component. Once again, this still requires the images to be present in the images folder, but more importantly, it isn't ideal for a production environment because the images folder must be placed outside of the src folder to be served. This could also lead to security issues. Therefore, I don't recommend this option at all.



Option 3:
Same as Option 1, but lazy loaded like the AvatarFromLazyFiles component and therefore flexible. You can load images by their name; however, it still requires that all of the images be present upon runtime and during production compilation. In other words, what you have on hand is what you get.



Option 4:
So... the ideal option would be to build an image microservice or use a CDN that handles all things images (uploading, manipulating/merging, and serving images). The client would only be able to select/upload new images to this microservice/CDN, while the microservice/CDN handles everything else. This may require a bit more work but offers the most flexibility, super easy to implement, and best performance -- as it offloads all the work from the client to the dedicated service.



In conclusion, unless you plan on having a set amount of images, use option 3, otherwise option 4.



enter image description here






share|improve this answer

























  • Thank you! This is great. Unfortunately option 4 is not quite feasible for my current structure but I made it work with Lazy Loading like you showed in the example.

    – Perniferous
    Mar 25 at 20:15















0





+100









The merge-images package has some quirks. One of those quirks is that it expects individual images to either be served from your local server (example: http://localhost:3000/images/head.png, http://localhost:3000/images/eyes.png, and http://localhost:3000/images/mouth.png) or that those individual images be imported into a single file.



Working example: https://github.com/mattcarlotta/merge-images-example (this example includes the first three options explained below with the fourth option utilizing the end result of using a third party CDN)



To run the example, clone the repo:



git clone https://github.com/mattcarlotta/merge-images-example


Change directory:



cd merge-images-example


Then install dependencies:



yarn install


Then run the development server:



yarn dev


Option 1:
The simplest implementation would be to import them into a AvatarFromFiles component. However, as written, it isn't reusable and isn't suitable for dynamically selected avatars.



Option 2:
You may want to serve them from the local server like the AvatarFromLocalServer component with a Webpack Dev Config. Then you would retrieve stored strings from an API and pass them down into from state into the component. Once again, this still requires the images to be present in the images folder, but more importantly, it isn't ideal for a production environment because the images folder must be placed outside of the src folder to be served. This could also lead to security issues. Therefore, I don't recommend this option at all.



Option 3:
Same as Option 1, but lazy loaded like the AvatarFromLazyFiles component and therefore flexible. You can load images by their name; however, it still requires that all of the images be present upon runtime and during production compilation. In other words, what you have on hand is what you get.



Option 4:
So... the ideal option would be to build an image microservice or use a CDN that handles all things images (uploading, manipulating/merging, and serving images). The client would only be able to select/upload new images to this microservice/CDN, while the microservice/CDN handles everything else. This may require a bit more work but offers the most flexibility, super easy to implement, and best performance -- as it offloads all the work from the client to the dedicated service.



In conclusion, unless you plan on having a set amount of images, use option 3, otherwise option 4.



enter image description here






share|improve this answer

























  • Thank you! This is great. Unfortunately option 4 is not quite feasible for my current structure but I made it work with Lazy Loading like you showed in the example.

    – Perniferous
    Mar 25 at 20:15













0





+100







0





+100



0




+100





The merge-images package has some quirks. One of those quirks is that it expects individual images to either be served from your local server (example: http://localhost:3000/images/head.png, http://localhost:3000/images/eyes.png, and http://localhost:3000/images/mouth.png) or that those individual images be imported into a single file.



Working example: https://github.com/mattcarlotta/merge-images-example (this example includes the first three options explained below with the fourth option utilizing the end result of using a third party CDN)



To run the example, clone the repo:



git clone https://github.com/mattcarlotta/merge-images-example


Change directory:



cd merge-images-example


Then install dependencies:



yarn install


Then run the development server:



yarn dev


Option 1:
The simplest implementation would be to import them into a AvatarFromFiles component. However, as written, it isn't reusable and isn't suitable for dynamically selected avatars.



Option 2:
You may want to serve them from the local server like the AvatarFromLocalServer component with a Webpack Dev Config. Then you would retrieve stored strings from an API and pass them down into from state into the component. Once again, this still requires the images to be present in the images folder, but more importantly, it isn't ideal for a production environment because the images folder must be placed outside of the src folder to be served. This could also lead to security issues. Therefore, I don't recommend this option at all.



Option 3:
Same as Option 1, but lazy loaded like the AvatarFromLazyFiles component and therefore flexible. You can load images by their name; however, it still requires that all of the images be present upon runtime and during production compilation. In other words, what you have on hand is what you get.



Option 4:
So... the ideal option would be to build an image microservice or use a CDN that handles all things images (uploading, manipulating/merging, and serving images). The client would only be able to select/upload new images to this microservice/CDN, while the microservice/CDN handles everything else. This may require a bit more work but offers the most flexibility, super easy to implement, and best performance -- as it offloads all the work from the client to the dedicated service.



In conclusion, unless you plan on having a set amount of images, use option 3, otherwise option 4.



enter image description here






share|improve this answer















The merge-images package has some quirks. One of those quirks is that it expects individual images to either be served from your local server (example: http://localhost:3000/images/head.png, http://localhost:3000/images/eyes.png, and http://localhost:3000/images/mouth.png) or that those individual images be imported into a single file.



Working example: https://github.com/mattcarlotta/merge-images-example (this example includes the first three options explained below with the fourth option utilizing the end result of using a third party CDN)



To run the example, clone the repo:



git clone https://github.com/mattcarlotta/merge-images-example


Change directory:



cd merge-images-example


Then install dependencies:



yarn install


Then run the development server:



yarn dev


Option 1:
The simplest implementation would be to import them into a AvatarFromFiles component. However, as written, it isn't reusable and isn't suitable for dynamically selected avatars.



Option 2:
You may want to serve them from the local server like the AvatarFromLocalServer component with a Webpack Dev Config. Then you would retrieve stored strings from an API and pass them down into from state into the component. Once again, this still requires the images to be present in the images folder, but more importantly, it isn't ideal for a production environment because the images folder must be placed outside of the src folder to be served. This could also lead to security issues. Therefore, I don't recommend this option at all.



Option 3:
Same as Option 1, but lazy loaded like the AvatarFromLazyFiles component and therefore flexible. You can load images by their name; however, it still requires that all of the images be present upon runtime and during production compilation. In other words, what you have on hand is what you get.



Option 4:
So... the ideal option would be to build an image microservice or use a CDN that handles all things images (uploading, manipulating/merging, and serving images). The client would only be able to select/upload new images to this microservice/CDN, while the microservice/CDN handles everything else. This may require a bit more work but offers the most flexibility, super easy to implement, and best performance -- as it offloads all the work from the client to the dedicated service.



In conclusion, unless you plan on having a set amount of images, use option 3, otherwise option 4.



enter image description here







share|improve this answer














share|improve this answer



share|improve this answer








edited Mar 24 at 5:05

























answered Mar 22 at 22:42









Matt CarlottaMatt Carlotta

4,1611714




4,1611714












  • Thank you! This is great. Unfortunately option 4 is not quite feasible for my current structure but I made it work with Lazy Loading like you showed in the example.

    – Perniferous
    Mar 25 at 20:15

















  • Thank you! This is great. Unfortunately option 4 is not quite feasible for my current structure but I made it work with Lazy Loading like you showed in the example.

    – Perniferous
    Mar 25 at 20:15
















Thank you! This is great. Unfortunately option 4 is not quite feasible for my current structure but I made it work with Lazy Loading like you showed in the example.

– Perniferous
Mar 25 at 20:15





Thank you! This is great. Unfortunately option 4 is not quite feasible for my current structure but I made it work with Lazy Loading like you showed in the example.

– Perniferous
Mar 25 at 20:15













1














Problem



This is a CORS issue. The images are coming from a different origin that's not your server.



If you look at the source of the library, you'll notice it's using a <canvas> under the hood to merge the images, and then getting the resulting data. Canvas cannot work with images loaded from another domain. There's good reasoning behind this. In essence, loading an image into a canvas is a way to fetch data, and since you can retrieve the data from the canvas as base64, a malicious one could steal information by first loading it into a <canvas> and then pulling it out.



You can read about it directly from the spec for the <canvas> element.



Solution



You need to serve the images either from the same origin (essentially, the same domain) or include Access-Control-Allow-Origin: ... on the HTTP headers that serve the images. There's ways to do this in firebase storage, or other server solutions you might use.






share|improve this answer























  • It is indeed a CORS issue. Access-Control-Allow-Origin doesn't seem to work when I try everything in that thread you referenced.

    – Perniferous
    Mar 25 at 20:14






  • 1





    Huh. Did you confirm the images are being served with a lax Access-Control-Allow-Origin? You can check in the Network tab on the browser. Edit: just noticed you commented above that you got it working. Happy to hear!

    – Kevin Chavez
    Mar 28 at 13:50
















1














Problem



This is a CORS issue. The images are coming from a different origin that's not your server.



If you look at the source of the library, you'll notice it's using a <canvas> under the hood to merge the images, and then getting the resulting data. Canvas cannot work with images loaded from another domain. There's good reasoning behind this. In essence, loading an image into a canvas is a way to fetch data, and since you can retrieve the data from the canvas as base64, a malicious one could steal information by first loading it into a <canvas> and then pulling it out.



You can read about it directly from the spec for the <canvas> element.



Solution



You need to serve the images either from the same origin (essentially, the same domain) or include Access-Control-Allow-Origin: ... on the HTTP headers that serve the images. There's ways to do this in firebase storage, or other server solutions you might use.






share|improve this answer























  • It is indeed a CORS issue. Access-Control-Allow-Origin doesn't seem to work when I try everything in that thread you referenced.

    – Perniferous
    Mar 25 at 20:14






  • 1





    Huh. Did you confirm the images are being served with a lax Access-Control-Allow-Origin? You can check in the Network tab on the browser. Edit: just noticed you commented above that you got it working. Happy to hear!

    – Kevin Chavez
    Mar 28 at 13:50














1












1








1







Problem



This is a CORS issue. The images are coming from a different origin that's not your server.



If you look at the source of the library, you'll notice it's using a <canvas> under the hood to merge the images, and then getting the resulting data. Canvas cannot work with images loaded from another domain. There's good reasoning behind this. In essence, loading an image into a canvas is a way to fetch data, and since you can retrieve the data from the canvas as base64, a malicious one could steal information by first loading it into a <canvas> and then pulling it out.



You can read about it directly from the spec for the <canvas> element.



Solution



You need to serve the images either from the same origin (essentially, the same domain) or include Access-Control-Allow-Origin: ... on the HTTP headers that serve the images. There's ways to do this in firebase storage, or other server solutions you might use.






share|improve this answer













Problem



This is a CORS issue. The images are coming from a different origin that's not your server.



If you look at the source of the library, you'll notice it's using a <canvas> under the hood to merge the images, and then getting the resulting data. Canvas cannot work with images loaded from another domain. There's good reasoning behind this. In essence, loading an image into a canvas is a way to fetch data, and since you can retrieve the data from the canvas as base64, a malicious one could steal information by first loading it into a <canvas> and then pulling it out.



You can read about it directly from the spec for the <canvas> element.



Solution



You need to serve the images either from the same origin (essentially, the same domain) or include Access-Control-Allow-Origin: ... on the HTTP headers that serve the images. There's ways to do this in firebase storage, or other server solutions you might use.







share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 22 at 22:50









Kevin ChavezKevin Chavez

6071922




6071922












  • It is indeed a CORS issue. Access-Control-Allow-Origin doesn't seem to work when I try everything in that thread you referenced.

    – Perniferous
    Mar 25 at 20:14






  • 1





    Huh. Did you confirm the images are being served with a lax Access-Control-Allow-Origin? You can check in the Network tab on the browser. Edit: just noticed you commented above that you got it working. Happy to hear!

    – Kevin Chavez
    Mar 28 at 13:50


















  • It is indeed a CORS issue. Access-Control-Allow-Origin doesn't seem to work when I try everything in that thread you referenced.

    – Perniferous
    Mar 25 at 20:14






  • 1





    Huh. Did you confirm the images are being served with a lax Access-Control-Allow-Origin? You can check in the Network tab on the browser. Edit: just noticed you commented above that you got it working. Happy to hear!

    – Kevin Chavez
    Mar 28 at 13:50

















It is indeed a CORS issue. Access-Control-Allow-Origin doesn't seem to work when I try everything in that thread you referenced.

– Perniferous
Mar 25 at 20:14





It is indeed a CORS issue. Access-Control-Allow-Origin doesn't seem to work when I try everything in that thread you referenced.

– Perniferous
Mar 25 at 20:14




1




1





Huh. Did you confirm the images are being served with a lax Access-Control-Allow-Origin? You can check in the Network tab on the browser. Edit: just noticed you commented above that you got it working. Happy to hear!

– Kevin Chavez
Mar 28 at 13:50






Huh. Did you confirm the images are being served with a lax Access-Control-Allow-Origin? You can check in the Network tab on the browser. Edit: just noticed you commented above that you got it working. Happy to hear!

– Kevin Chavez
Mar 28 at 13:50


















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55267789%2fmerging-images-using-javascript-react%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현