MakG10 / jquery-meme-generator

A jQuery plugin for interactive creating images with captions (memes) with basic image editing tools.
http://maciej.gierej.pl/en/jquery-meme-generator
59 stars 16 forks source link

external images not downloading #11

Closed anbudevilhunter closed 7 years ago

anbudevilhunter commented 7 years ago

hi i have added external image source like this

but not downloading , thanks

MakG10 commented 7 years ago

That's because of security measures of CORS, in this case it prevents attackers from obtaining images they shouldn't have access to on behalf of the user. https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image

In order to get canvas data with external image (in this case you tried to download the image with captions, what is preceded by transforming canvas into data URL), the remote server must be serving that image with "Access-Control-Allow-Origin" header allowing your domain.

If for some reason you don't want to host images on your server, then you need to find sites which allow cross origin requests, i.e. imgur.com

anbudevilhunter commented 7 years ago

Thank you

On Tuesday, September 5, 2017, MakG10 notifications@github.com wrote:

That's because of security measures of CORS, in this case it prevents attackers from obtaining images they shouldn't have access to on behalf of the user. https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image

In order to get canvas data with external image (in this case you tried to download the image with captions, what is preceded by transforming canvas into data URL), the remote server must be serving that image with "Access-Control-Allow-Origin" header allowing your domain.

If for some reason you don't want to host images on your server, then you need to find sites which allow cross origin requests, i.e. imgur.com

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/MakG10/jquery-meme-generator/issues/11#issuecomment-327227290, or mute the thread https://github.com/notifications/unsubscribe-auth/AeMi3LOiRTgcc347rYD4aCg1r150Krx8ks5sfXQhgaJpZM4PNJBY .

--

●♠ANBU♥DEVILHUNTER·٠•●·