Does it matter? — image.jpg or image.JPG or image.jpeg or image.JPEG
JPG or jpg
- Yes. If your filename is "beach.JPG" then you need to reference it as "beach.JPG" — having "beach.jpg" in the URL won't work!
The following work for a file named "beach.jpg":
<img src="images/beach.jpg" alt="Sandy beach and ocean on Cape Code" />
main div.hero { background-image: url(../images/beach.jpg); background-size: cover; }
The following work for a file named "beach.JPG":
<img src="images/beach.JPG" alt="Sandy beach and ocean on Cape Code" />
main div.hero { background-image: url(../images/beach.JPG); background-size: cover; }
- No. From an "image" standpoint, .jpg or .JPG or .jpeg or .JPEG doesn't matter. As long as the case of your filenames match the case in your URL references you'll be fine.
jpeg or jpg
- Yes. See note above about case and names matching between references in HTML markup and file names.
- No. Media types can be mapped to multiple file extensions,
so generally either
picture.jpg
orpicture.jpeg
filenames are fine.
And for JPEG images, the media type (also known as MIME type) is "image/jpeg"