---
title: "Discussion on \"How to preload images for canvas in JavaScript\" | Hashnode"
description: "Discussion on \"How to preload images for canvas in JavaScript\". Introduction\nThis past week I was toying around with the HTML5 canvas element, trying to join two images together.\nAt first, it seemed fine, but when I tried to reload the website, it was a mess. One image would load, but the other wouldn't.\nInvestig..."
url: "https://hashnode.com/posts/how-to-preload-images-for-canvas-in-javascript/63c684b6b53f5f0ed0f8b012"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How to preload images for canvas in JavaScript](https://blog.akbal.dev/how-to-preload-images-for-canvas-in-javascript?utm_source=hashnode&utm_medium=feed)

Introduction This past week I was toying around with the HTML5 canvas element, trying to join two images together. At first, it seemed fine, but when I tried to reload the website, it was a mess. One image would load, but the other wouldn't. Investig...

Jan 17, 2023 · 2 min read · blog.akbal.dev  
Read the article

-   [#tutorial](https://hashnode.com/tag/tutorial)
-   [#beginners](https://hashnode.com/tag/beginners)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#canvas](https://hashnode.com/tag/canvas)
-   [#images](https://hashnode.com/tag/images)

## Written by

[Alejandro Akbal](https://hashnode.com/@AlejandroAkbal)

@AlejandroAkbal · Spain

  
[View profile](https://hashnode.com/@AlejandroAkbal)

Developer

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
