Embedding local images in Rentry through base64

Did you know you can embed local images by converting them to base64 code?

You can use a tool like CyberChef to encode your images.

Before you begin

Considerations

There are a couple drawbacks to this method:

  • Base64 code is a loooooot of text.
  • If it's a big enough image, it may not actually render.

Instructions

note: These instructions assume you're using CyberChef

  1. On the left sidebar, find To Base64
  2. Click and drag it to the Recipe panel
  3. At the Input panel, click on "Open file as input"
  4. Select the image you want to encode in the file picker
  5. In the Output panel, there will be a base64 code representation of you image. Copy that code to your clipboard
  6. Paste that code into where it says [YOUR IMAGE CONVERTED TO BASE64 CODE HERE] in the following code snippet:
    ![](data:application/charset=utf-8;base64,[YOUR IMAGE CONVERTED TO BASE64 CODE HERE])
    

Congrats! You now no longer need to rely on external resource carrds to add images to your Rentries!

Edit Report
Pub: 16 Jan 2023 03:13 UTC
Edit: 16 Jan 2023 03:16 UTC
Views: 573