0

I am having trouble problems trying to get my extension to work. I am trying to load an image with CSS but Chrome is not displaying it. I saw another post that described my problem, and the solution was to use base64. The example provided was not detailed enough for me to understand. Can someone please provide a more detailed example, or perhaps offer an alternative to base64?

body{ background-image:url(face.png); }

body { background-image: url(data:image/png;base64,iVB...); }
Community
  • 1
  • 1
Jon
  • 8,205
  • 25
  • 87
  • 146

1 Answers1

1

Go to http://www.motobit.com/util/base64-decoder-encoder.asp

Upload your image file by browsing (below 'or select a file to convert to a Base64 string').

Connvert to base64. Copy the generated string and put it in your css.

e.g. If base64 encode of your image is : "9j/4AAQSkZJRgABAQEASABIAAD/4gv4SUNDX1BST0ZJTEUAAQEAAAvoAAAAAAIAAABtbnRyUkdC"

put,

body { background-image: url(data:image/png;base64,9j/4AAQSkZJRgABAQEASABIAAD/4gv4SUNDX1BST0ZJTEUAAQEAAAvoAAAAAAIAAABtbnRyUkdC); }

Jashwant
  • 28,410
  • 16
  • 70
  • 105