Base64 image doesn't load in Firefox - html

I have base64 converted image and put on container background like this:
background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADsAAAAuCAYAAACWPmGbAAAGL0lEQVRo3tWaC2wUVRSGp7a1yqtAWuiCivKIAUWUKgGJGB5FBZUYrRaV1qgFi9gKigg+EBSBqAgoIij1AfhAxSqKyhJTRQtG1Bqtb4wvCsGmUkSklIr/2fzXXG9mutOZ2e12k4+27M6999w595z/nFnLSsBXKCurK7gYzAUvgg/Br6AWHARHwF5QA6rA22AlmAwGgVQrkV9YYCcwHXwG/qFBXvkTvABGJZqRKWAW2O/TQCc+BgMSwdBk8GaMjNQR1z+/pY29LA6GKna0tLET42jsHy1tbEfwY5yMvT0Rzu1xYFMMjfwLFCWCoRmgDUhiXpV82RCQkTvBA6A75zqhOQvLBH1ANhjMn/1BD3C0R2NvpIGdjXybBxaDD8DvLgyrBz+Al8FMCoskbUzZyGqnRZwOpoHnwdfgQJTJRARUg3Lu5qWgvQtjx/B6ubYYtHP43LGgFzd4CBihbXZIN8zGjnVc3+emS90NfgrIjWS3XwMjoxj8uHbNfm7wNaCnB0+RTTkHzAaV2rgiK7PVhwrBvhgGibdAtyYWmeewyXVgG3gJLAH3gxnkLrAAPAU2gu9Bo3F9I7V1SE00NU6hX85UehTZmAvWU9v6mUuO3jzdOyKu7jIABMVEw0A52wUOhg8E1/PurQVbwHbwjaghFgzy9xtgueRRBqIsm/E6gDUWL4yXsVcYiyhk8JDyrGuM0ttYCpca9Ud9HAwV4ZBsLCSdZ+0II/7TItgl0Pg0UNLhzbz7av6p6s0zwKcxVDASHVMcFhZiADOrlPfBw2ASuJBu3RMcz8whv5/M6JtHN15r46kSeAvVZOPUAQbnMXrVBWDkJ6xTMzh+b9CvibsxCmwI0Mt+BnNAF30S2fmFugqS38FQUAJKwbt0t1pjMdIa2c0C+VUwn2Vbd8OQwUwtJTZ3ta1NMJExHqRIqXbRuZAj8BVz9K3iBTab2Uf+eV3biWJduvk8N0eBYZRwku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7cG3SWJp8GpFN/RHj1KO+ihmCX/OBudxe8jlmtlWh2lqNSxPeK5nn8BPgwi0dd0GXEAAAAASUVORK5CIIA=');
Chrome and other browsers open it without any problem, except Mozilla Firefox. It show me blank image and when I try to open image manually, it gives me error:
The image: "data:image/png;base64,iV...5CIIA=" cannot be displayed
because it contains errors
Any ideas why this happens and how to fix?
Here is the fiddle to try: http://jsfiddle.net/zur4ik/QUXV5/

Looks like there's something wrong with the actual base64 data. See similar working example based on a image/png;base64 file.
Try using these tools to encode and decode your files.

Related

Why do images display in raw file URL, but NOT in html display using Chrome? Other browsers are fine

As of October 1, images that are hosted on our server, will NOT display in Chrome for any users when the image is trying to display in html. It works fine in all other browsers. If I paste the exact URL of the image file in the browser, the image works.
example:
This image displays fine here if I paste into my browser:
http://example.com/email/2020/09/file.jpg
But, when the image is included in an html page, the image does not display. i.e. in a webpage, the images show up as missing.
I've discovered that images from other servers work just fine. Why would one server work and another not. I'm trying to get an answer to our I.T. department to let them know if they need to update something on our servers to fix this issue, or if this is a Chrome issue that Google needs to fix?
Any ideas?
Thanks for your help.

Image would not like to open in IE10 and Mozilla

I upload image to server and try to load it in different browsers.
I'm using this type of code:
<img alt="Name2.jpg" src="http://www.website.net/addVid/maker/Name2.jpg">
This is result:
Chrome: Working fine.
Opera: Working fine.
IE10: square with cross.
Mozilla: says " The image blablabla.....cannot be displayed because it contains errors.
I have NO idea why it's happens.. any suggestions?
URL provided in src is not valid
src="http://pcplacements.com/wp-content/uploads/Hello-Picture.gif"
once try this.
The link that you provided is invalid however I am assuming that you did not want to post the actual URL for whatever reason.
Why are you trying to load the image via URL, just import the image over to your server and then access it:
<img alt="Name2.jpg" src="FileDirectory/Name2.jpg">
problem is with the image. the image only contains the error, once replace the image and try again, i am sure it will.
Definitely.

Including a gif in html page

I have no idea why a simple gif image is not being loaded properly. In the html code I have the usual
<img src="/img/loading.gif" alt="Loading" title="Loading" />
and the file is in that folder. The weird thing is that if I place there /img/logo.png the image is loaded properly.
The filename is correct, I've even copied and pasted it renaming the original files.
PS tested on Firefox 12, Safari 6.0.2 Chrome 23.0.1271.95 (all for Mac)
It was probably a corrupt gif. Your code should work with some other gif. If you really want to get the corrupt gif to work, try opening it in an image editor program and then resave it as gif (or any other format).
Silly question, but what does your gif look like? Is it transparent, or white against a white background?
One possible way to diagnose the problem would be (in Chrome or Firefox), to press F12 to bring up the developer tools and look at your img element to see if the image has loaded in the DOM.
I think the problem was with the gif file, probably somehow broken. I got it from a random resources web site and downloaded from it.
I've tried with a new file got from http://www.ajaxload.info/ now with the code unchanged it works fine.
Edit: the "broken" gif file was working fine elsewhere in the system (e.g. quicklook).

jpg image not getting rendered in HTML

I have one jpg image which is getting rendered in FF but not in IE6.
<img src="Image/warn.jpg" alt="aimage" />
Path is correct as this is working on FF. any clue?
Well, the file name would be server-side so it shouldn't matter if you use IE6 or FF or Chrome or Opera. IE6 is probably able to find the file, just not to display it.
With JPG files, there is an option to store it as progressive or as a lossless JPG file. It's likely that this image happens to be in a file format that IE6 just doesn't understand. The lossless JPG format is slightly newer than IE6, I think.
Is it really a jpg image, isn't it e.g. PNG with wrong suffix? Have you tried to use directly the url of the jpeg image?
try to right-click the image and then click properties, in the properties click the security tab, and in the security tab I think you should just add user group.

Images not displaying in WebKit based browsers

For some strange, bizarre reason, my images in my website just will not display on webkit based languages (such as safari and chrome).
This is the image tag
<img src="images/dukkah.jpg" class="imgleft"/>
Not only does it not display in the website, it wont display when accessed directly at http://kilkin.massiveatom.com/kilkin/images/dukkah.jpg
...Why?
Imagemagick reports that this particular image is saved in CMYK colorspace instead of the more standard RGB. Try converting it, it should be more compatible with the webkit rendering engine.
Imagemagick is available for download from http://www.imagemagick.org/script/index.php - it's available for windows and *NIX systems.
I have come across this problem a couple of times.
I think it is because of some problem in the file format.
Try importing the file in some image editor and saving it again. This should get rid of the problem.
I tried the url you gave in FireFox 3 and IE 6, IE 6 won't show it either, firefox works. My guess is that there is something wrong with the jpg file.
Are you JPEG's compressed in Jpeg 2000 Format? If so, there is a known bug:
https://bugs.webkit.org/show_bug.cgi?id=8754
"The image “http://kilkin.massiveatom.com/kilkin/images/dukkah.jpg” cannot be displayed, because it contains errors." and the image itself has some XML-fragment in it. So as others proposed: try to open with an editor and resave it.
It's as stated elsewere a bug in the image.
Irfanview is a very good viewer that will display any image (and other formats as well), is small and free and will also let you adjust, crop or rescale images very easily without heavy programs like photoshop.
I suggest download irfanview and the image, open the image in irfanview and hit CTRL+S and save it over itself. Then upload the image again. Any problem should be solved.
Your image file does not contain image data, it contains html text:
$ curl -s http://kilkin.massiveatom.com/kilkin/images/dukkah.jpg
<html><head></head><body><!-- vbe --></body></html>