0

I have a JPEG picture, exported from a PhotoShop PSD, not to big but ~2MB

When I want this picture as a background image with this CSS:

body{
    background-color: green;
    background-image: url("url");
    background-size: 100%;
    background-repeat: no-repeat;
    background-position: top center;
}

and then embed it in my website with

<object width="100%" height="100%" data="data:application/pdf;base64,'myBase64string'" type="application/pdf">'
    <embed src="data:application/pdf;base64,'myBase64string'" type="application/pdf" />
</object>

the resulting object is empty, no errors in the console. Although when I fill it in in https://base64.guru/converter/decode/pdf I get a valid PDF containing what I expect.

Unfortunately the customer won't let me share the actual picture, but when I downgrade the quality to 80% using PhotoShop, the size drops to ~1MB and it does work.

Anybody got any insights?

0 Answers0