none
encode image in base64 RRS feed

  • Question

  • Hi all,

    I am working in Visual Studio and trying to create a simple webpage on my desktop. I inserted an image like this:

    <img src="pic01.png" alt="Smiley face" height="42" width="42">
    However, the image is not showing up. VS keep saying

    "encode image in base64" in the left hand side with a yellow light bulb.

    Please can you let me know what I am doing wrong?

    thanks,

    Naveen

    Sunday, March 17, 2019 8:32 PM

Answers

All replies

  • Hi Naveen,

    Welcome to MSDN forum.

    Can you right click on html file and select view in browser?

    Where is the path of pic01.png?

    >>VS keep saying "encode image in base64" in the left hand side with a yellow light bulb.

    When you have some binary data that you want to ship across a network, you generally don't do it by just streaming the bits and bytes over the wire in a raw format. Why? because some media are made for streaming text. You never know -- some protocols may interpret your binary data as control characters (like a modem), or your binary data could be screwed up because the underlying protocol might think that you've entered a special character combination (like how FTP translates line endings).

    In short, Base64 Encoding means converting that image or other binary data into textual data.

    https://stackoverflow.com/questions/201479/what-is-base-64-encoding-used-for

    You can have a look at the example to know more about encode image in base64:

    https://www.itorian.com/2014/02/base64-encode-image-in-website-web.html

    Best regards,

    Joyce


    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, March 18, 2019 7:25 AM
  • Hi, Thanks for your swift reply. Please see a screenshot of what I have. I saved all files in the same folder. https://snag.gy/Dpk6bE.jpg I downloaded the extension but it is not working. Please help. Naveen
    Monday, March 18, 2019 9:34 PM
  • Try src instead of scr.

    • Marked as answer by Naveenganpat Friday, March 22, 2019 7:59 PM
    Monday, March 18, 2019 9:51 PM
  • Thanks, this is now solved.
    Monday, March 18, 2019 10:45 PM
  • Hi,

    Thank you for your updating.

    Please check if you have Wrong extension: src="pic01.png" when your image is .jpg

    Best regards,

    Joyce


    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, March 19, 2019 9:32 AM