Unable to load images
See original GitHub issuehello
i’m trying to use vue-html2canvas but for some reason it s not able to load images
note: i have this as options
const options = {
type: 'dataURL',
backgroundColor: 'red',
allowTaint: true,
width: '256px',
height: '512px',
imageTimeout: 0,
}
Console output:
0ms html2canvas: html2canvas $npm_package_version
1848ms html2canvas: Document cloned, using computed rendering
1849ms html2canvas: Starting node parsing
1854ms html2canvas: Added image https://www.lesroyaumes.com/images/personnages_midas/hommes/corps/corps_p0_@1X.webp
1856ms html2canvas: Added image https://lesroyaumes.cdn.oxv.fr/images/personnages_midas/hommes/corps/visage_0_p0_@1X.webp
1860ms html2canvas: Added image
1892ms html2canvas: Finished parsing node tree
1928ms html2canvas: Unable to load image Event {isTrusted: true, type: "error", target: img, currentTarget: img, eventPhase: 2, …}bubbles: falsecancelBubble: falsecancelable: falsecomposed: falsecurrentTarget: nulldefaultPrevented: falseeventPhase: 0isTrusted: truepath: [img]returnValue: truesrcElement: nulltarget: nulltimeStamp: 20608.655type: "error"__proto__: Event
2038ms html2canvas: Finished loading 3 images (3) [img, img, null]
2039ms html2canvas: Starting renderer
2041ms html2canvas: Canvas renderer initialized (541x0 at 1708.4635009765625,116.97915649414062) with scale 0.6000000238418579
2054ms html2canvas: Render completed
can you please take a look? source code
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:12 (1 by maintainers)
Top Results From Across the Web
7 Ways to Fix Google Chrome Not Loading Images - MakeUseOf
7 Ways to Fix Google Chrome Not Loading Images · 1. Update Google Chrome · 2. Go Incognito · 3. Check Chrome's Site...
Read more >9 Fixes When Images Not Loading in Chrome - Help Desk Geek
9 Fixes When Images Not Loading in Chrome · 1. Try a Different Browser · 2. Check the Show All Images Option ·...
Read more >5 Reasons Why Your Images Won't Load | SiteUptime Blog
1. Your Photos Are Too Large · 2. The Image Doesn't Exist · 3. Wrong Filename and Extension · 4. Local File Path...
Read more >Troubleshoot issues with Google Images - Google Search Help
Step 1: Try private browsing mode · Step 2: Clear your browser's cache & cookies · Step 3: Turn off any toolbars &...
Read more >7 Reasons Why Images Are Not Loading on Your Website
7 Reasons Why Images Are Not Loading on Your Website · 1. Incorrect File Paths · 2. Files Names Misspelled · 3. Wrong...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It is not working. I am getting the same issue.
Actually, we don’t really need to put it inside a
setTimeout()
. It just depends on your use case.This is what I did to make it work (esp loading images using URLs):
take note of the crossorigin=“anonymous” above…