I used base 64 and its taking me an hr to delete it

i used this site to embed an image that wasn’t online.
It gave me this huge chunk of code that froze my code pen twice. I have been deleting it for the past hour.

The image never showed up.

If a picture is not in a place that codepen can get to it it doesn’t matter how you call it, it still won’t show.
If you have a picture on your box that you’d like to use in a project you need to host that image somewhere. You can use GitHub or some other image hosting site. Don’t use your Google acc’t because user’s do not have access to your acc’t and won’t see the image. I see some people using imgur at times but imgur had issues with codepen so a lot of times an image doesn’t display if it’s hosted there.

1 Like

I recommend just using codesandbox.io and directly uploading your picture to it. If the picture is really huge, you might want to optimize it some (there’s oodles of online image optimizers, pick any one).

Base64 encoded whatever will work perfectly fine on CodePen, you can embed any binary data directly on the page.

But base64 is for very small binary things (like say an icon, or a small subset of a font). It does not make the encoded thing smaller, so you will end up with a gargantuan amount of stuff, like millions of characters. If you then attempt to paste that stuff into a normal text editor (ie one installed on your computer, like VSCode) the text editor will often lock up for a while. If you try it on CodePen, which uses a web-based editor which is far less powerful, that will cause that browser tab to lock for a long period of time.