: Can .php be an image extention? I've recently made a new website and I'm using a template. See this image (link): http://mirrorlessspecialist.com.au/wp-content/themes/paperpunch/images/sidebar/rotate.php
I've recently made a new website and I'm using a template. See this image (link):
mirrorlessspecialist.com.au/wp-content/themes/paperpunch/images/sidebar/rotate.php
The file extention is .php. Can anyone explain this?
NOTE: When an image is posted here, stackexchange creates it's own location to store it. If you're right clicking and saving the pic in the question, you'll get a .jpg. But, right click on the picture here.
Here are screenshots of what happens when I try to save it:
More posts by @XinRu324
1 Comments
Sorted by latest first Latest Oldest Best
A PHP script on the server (which is what the URL causes to be run) returns a response to the browser which contains the header
Content-Type: image/jpeg
so the browser knows that what is returned is a JPEG image and displays it accordingly.
The browser uses the response headers to determine what to do with content. Client operating systems may behave differently — Windows, for example, has a heavy dependence on the filename extension. But if you attempt to save the image from the browser on a Windows system, you may find it's given a .jpg extension because the browser knows it's a JPEG image.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.