html - Can an Image in Web Browser use any file extension? -



html - Can an Image in Web Browser use any file extension? -

what if rename image custom file extension, choke browsers?

for example..

image.jpg

rename to:

image.xyz

then in markup do..

<img src="image.xyz">

the image still jpeg format uses custom file extension. tests pass. cause potential issues?

yes, possible, you'd need set mime type in server. browsers don't care extension, care mime type server specifies image should be.

when mime type set, returns in content-type header of response image request.

html image http browser file-extension

Comments

Popular posts from this blog

php - How to pass multiple values from url -

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

database - php search bar when I press submit with nothing in the search bar it shows all the data -