How to Convert Images Into Base 64 Data URLs with JavaScript

Поделиться
HTML-код
  • Опубликовано: 20 янв 2025

Комментарии • 30

  • @dcode-software
    @dcode-software  2 года назад

    🔽 CONVERT CANVAS INTO BASE64 URL 🔽
    ruclips.net/video/YoVJWZrS2WU/видео.html
    🎓 COMPLETE JAVASCRIPT CRASH COURSE FOR BEGINNERS 👇:
    www.udemy.com/course/the-ultimate-javascript-dom-crash-course/?referralCode=DC343E5C8ED163F337E1

  • @JOSEEMANUELCASASTORRES
    @JOSEEMANUELCASASTORRES 11 дней назад

    Thanks! Your video help me too much!

  • @pouriyanourouznejad7090
    @pouriyanourouznejad7090 2 года назад +3

    1) Can we convert that very long url to a very short url and get the same image as result?
    2) this data url will only works for images? Or we can use it for any files?
    3) I tried to create a download link for an image with data-url in the anchor tag. but when I click on the anchor tag, it doesn't show me the image as a result! Just shows a blank screen! And I have to reload that blank screen to see the image! Y is this happening? What should I do?
    (my native language isn't English, so... Sorry if I did something wrong in my words 😁)

  • @earlchesterantonio1581
    @earlchesterantonio1581 2 года назад +1

    Can i achieve this results with js only? Without using the file input?

  • @erturkyorulmaz7376
    @erturkyorulmaz7376 Год назад

    Can we get this data type just giving local url? (exmp : img.src = "images/sample.jpg")

  • @faaizalam235
    @faaizalam235 2 года назад

    Bro I am. Working on a project, and that where I had to use your this method for image to be stored in local storage but now I want to send it to the server so it want this base 64 url image to be as it was in file object, so how can I basically make the back after making a image into string base 64 to its original face

  • @WiLDeveD
    @WiLDeveD 2 года назад

    Well done Dom !!! cool video. thanks

  • @yassineabdelouafi
    @yassineabdelouafi Год назад

    Thank You ,i need a help please how to upload image as base64 in dexie.js database ?

  • @prakashchaure6307
    @prakashchaure6307 2 года назад

  • @Acuce7ibd468j
    @Acuce7ibd468j 2 года назад

    I really need to know how to get the file as blob without using the form parent tag . Thanks

  • @Muhammad-bp7dq
    @Muhammad-bp7dq 2 года назад

    off topic......
    what should i do after i learn vanila js ?

    • @dcode-software
      @dcode-software  2 года назад

      Learn a framework - React, Vue, Svelte etc.

    • @riteshgsh
      @riteshgsh 2 года назад +1

      If you are interested in moving forward with front-end then learn React and if backend then Node js

  • @hikari1690
    @hikari1690 2 года назад

    Haha, a few weeks after doing this myself. I wish I could tell past me to procrastinate a little and just watch this

  • @jefferyaaron3462
    @jefferyaaron3462 2 года назад +1

    I got errors on jpg so this is the code i use u can wrap a function around it
    return new Promise((res, rej) => {
    const reader = new FileReader();
    reader.readAsDataURL(file);
    reader.onload = () => {
    res(console.log(reader.result));
    };
    reader.onerror = (err) => {
    rej(err);
    };
    });

  • @whatthefunction9140
    @whatthefunction9140 2 года назад

    Do a video on the limits of data urls

  • @getsetalk
    @getsetalk 2 года назад

    How to convert any image address which is uploaded at any website , that's how to convert In Blob

  • @aaomms7986
    @aaomms7986 Год назад

    Thank man!!

  • @RandomMusicD
    @RandomMusicD Год назад

    Thanks bro

  • @thetutorialdoctor
    @thetutorialdoctor 5 месяцев назад

    Solid.

  • @Funny-collector
    @Funny-collector Год назад

    I need the rest of the video. or any other video to watch

  • @naiandersonbruno1841
    @naiandersonbruno1841 2 года назад

    Theme vs code, please 😁, and thanks for helpe

    • @dcode-software
      @dcode-software  2 года назад +1

      No problem. The theme is called "dcode" - you can find it on the VS Code Marketplace

    • @naiandersonbruno1841
      @naiandersonbruno1841 2 года назад

      @@dcode-software thanks😁

  • @dynamics9000
    @dynamics9000 2 года назад

    If you want to beat the market or become a millionaire, the first thing you need to do is , to get financial education. a fellow creator][[]][

  • @dchubad
    @dchubad 2 года назад

    darta lol

  • @nanonorthlabs3375
    @nanonorthlabs3375 2 года назад

    Ive said this before on your videos I’ll say this again, these videos have very little to do with software engineering or improving your skills as a software developer and more to do with being good at following step by step instructions, aka tutorials. Channels like these are detrimental for beginners, this is not how problem solving skills are developed. Now I understand if you are showing how to solve problems or atleast make something challenging, but who the needs videos that are 4-10 mins long where you can literally google it in 30 seconds. This is contenting whoring and fishing for subscribers. It’s like language learning channels that never go past the first level

    • @dcode-software
      @dcode-software  2 года назад +7

      This intends to be a tutorial-style video. If someone needs to know how to convert an image into a data URL they can search RUclips and find this video. It's 4 minutes long so the viewer can get their answer quick and move on