5 ms·
Image EXIF Orientation Bug – or Feature?
- Theodores 8y agoOne thing I one day want to try is to include some unique search terms in an image EXIF description to see if Googlebot picks it up in a way that is subsequently searchable. As for Wordpress people using third party services to remove bloat from images in a paid for, tediously manual way - don't! Configure your server to do it with Google's mod_pagespeed. You can serve src_set images whilst you are at it that way making the web quicker and more eco friendly.
- mnw21cam 8y agoOr just load the image into GIMP and make use of its nifty image optimisation while saving it again. (Oh, and feature. Definitely feature.)
- praveenscience 8y agoWow. You mean to say, the server can strip it off while serving the images?
- anonymfus 8y ago>I’ve found the results strange in Safari and Chrome, since there’s this CSS property for <img />, image-orientation, and with it one can say to use the EXIF declared on the photo metadata to fix the orientation. The default value is 0deg. If you want show the image with the correct orientation, the value must be from-image. I went to the linked specification (https://www.w3.org/TR/css3-images/#image-orientation https://www.w3.org/TR/css3-images/#image-orientation) and "from-image" is not specified here as a possible value of "image-orientation".
- jwilk 8y agoIt was in CSS 4 at some point: https://www.w3.org/TR/2012/WD-css4-images-20120911/#the-image-orientation https://www.w3.org/TR/2012/WD-css4-images-20120911/#the-imag...
- garaetjjte 8y agoIt seems that Firefox from-image is nonstandard (from-image in specification is only defined for image-resolution). And default behavior of ignoring EXIF rotation seems correct according to this weird specification: >Note that some devices will "tag" an image with some metadata indicating its correct orientation, so image viewing software can do the necessary transformation themselves. Due to legacy compatibility restraints, Web browsers are required to ignore this data by default. A future level of this specification is expected to have a value that applies the metadata-specified transformation automatically. IMO EXIF rotation should be applied always, and any CSS rotations should combine with it, not override.
- leni536 8y ago> IMO EXIF rotation should be applied always, and any CSS rotations should combine with it, not override. I agree. EXIF rotation is a part of the image and it's just an implementation detail of the image data. Browsers shouldn't leak this.
- michaelt 8y agoPresumably the issue is "Given that browsers that ignore EXIF rotation already exist, should modern browsers display the same page differently?"
- anonymfus 8y agoYes because it will fix more pages than it will break.
- praveenscience 8y agoBut what about the compatibility, graceful degradation, etc. of the browsers that yet don't support this feature? Won't that break everything else?
- IshKebab 8y agohttps://drafts.csswg.org/css-images-3/#propdef-image-orientation https://drafts.csswg.org/css-images-3/#propdef-image-orienta... But it has been dropped from the next version which states: > If the image has an orientation specified in its metadata, such as EXIF, the UA must rotate or flip the image to correctly orient it as the metadata specifies.
- KwanEsq 8y agoThat statement appears to only apply to images created with the CSS image() function, not HTML <img>s.
- dade_ 8y agoCorrect conclusion, strip the info. EXIF is a mess on the web, thankfully Digikam easily normalizes all of my photos with simple batch process. Not my videos though.
- praveenscience 8y agoMost of the online upload services do it. Like Imgur strips these information. :)
- cbr 8y agoTo fix these: convert -auto-orient in.jpg out.jpg
- maaark 8y agoA note for clueless windows users: convert /? Converts a FAT volume to NTFS. CONVERT volume /FS:NTFS [/V] [/CvtArea:filename] [/NoSecurity] [/X] volume Specifies the drive letter (followed by a colon), mount point, or volume name. /FS:NTFS Specifies that the volume will be converted to NTFS. /V Specifies that Convert will be run in verbose mode. /CvtArea:filename Specifies a contiguous file in the root directory that will be the place holder for NTFS system files. /NoSecurity Specifies that the security settings on the converted files and directories allow access by all users. /X Forces the volume to dismount first if necessary. All open handles to the volume will not be valid. You probably can't do any damage attempting to use it to convert images, but there might be a way to screw up attempting to convert an image so badly you destroy your filesystem.
- praveenscience 8y agoExactly, this command is for converting a file system and not an image or a single file.
- cbr 8y agoIt's unfortunate that ImageMagick decided to call their primary command "convert".
- poizan42 8y agoDon't do that, it will degrade the image quality. Use exiftran instead as it will do lossless rotation.
- praveenscience 8y agoQuick questions regarding this: 1. Will this work without having to install new software on Windows, Mac, Linux? 2. Will this degrade image quality?
- leni536 8y agoThe exiftran utility can strip the EXIF orientation tag and apply the rotation losslessly to the image. Looks like it worth doing it. AFAIK imagemagick reencodes the image.