I have an html page for displaying images, but one of image in that page is not displaying in google chrome but all other browsers like firefox,opera is displaying the images correctly.
The code is like <img src=“image/angels/Alena\'s Angels Flyer_t.jpg”/>, i think that may be due to escaping(\) ( we can not change the image name ) , but the image issues is only in chrome . If anyone knows the solution please help me Thanks in advance…
Don’t have an apostrophe in a file name like that. It’s not practical at all. Just be creative and make it something like “Alena-Angels-Flyer_t.jpg”. It’s also a good idea not to have spaces in your online file names, as it makes for ugly URLs.
I don’t see why you cannot change the image name but it would most likely translate to the following: <img src=“image/angels/Alena\'s%20Angels%20Flyer_t.jpg” alt=“” /> though if possible you should change the filename to something more sensible as the backslash (Hex 5C) is not a good idea at all unless maybe it was relating to a dynamic modification by a script.
That slash needs to go – URL’s are not escaped by slashes… so that’s being treated as a literal. “can’t change the name” just means “can’t make it work on the web”.
What are you using to generate the filename in the first place? Is it literally on the drive without the forward slash? If so, you need to get rid of that slash.
As a rule of thumb, it’s ALWAYS a bad idea to use anything more than a…z, A…Z, 0…9, _, . or + in filenames without using the %XX escape codes.