Image

Board for discussions around the Basilisk web browser.

Moderator: Basilisk-Dev

User avatar
cefer
New to the forum
New to the forum
Posts: 2
Joined: 2023-07-08, 12:52

Image

Unread post by cefer » 2023-07-08, 13:03

Using basilisk for shopping, some images appear rotates (turned 90 degrees left or right) when in others web navigators (edge, firefox, waterfox, and others) the images appear in different position

For example, point to:

http://www.magnoshop.com/1-start.php?ce ... o=parlante

http://www.magnoshop.com/1-start.php?ce ... o=sombrero

http://www.magnoshop.com/1-start.php?ce ... tulo=termo

Using Archlinux updated to 20230708

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35651
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: Image

Unread post by Moonchild » 2023-07-08, 13:43

If the website wants browsers to extract the JPEG orientation from the image's meta-data (EXIF), they should indicate this with the following CSS rule:

Code: Select all

image-orientation: from-image;
This website doesn't do that - as a result, the browser will display the image in its native orientation.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
FranklinDM
Add-ons Team
Add-ons Team
Posts: 582
Joined: 2017-01-14, 02:40
Location: Philippines

Re: Image

Unread post by FranklinDM » 2023-07-08, 14:06

The spec was changed (csswg-drafts#3799) and they switched the default value of the image-orientation property from none to from-image, which is likely why this site doesn't explicitly set that property.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35651
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: Image

Unread post by Moonchild » 2023-07-08, 14:39

The approach that images should always be rotated according to EXIF and the developers can use image-orientation:none if they want to disable this behaviour doesn't always work. This is because image-orientation is only applied if the element is in the DOM (as noted in the Chromium bug about this change). For image and canvas elements that are not in the DOM, currently no method exists to disable auto-rotation according to EXIF, removing control over images by webmasters who may want to use native.

Another problem with that is that opaque requests can no longer use image-orientation:none because of a security/privacy issue with reading and responding to EXIF data by default, so approaching this from the "don't implicitly extract meta data" side will provide a website with full control over the image. New spec implementations will not be able to override the image orientation and using the native orientation when they want, unless they complicate matters a lot by using CORS headers and what not.

So, I really don't want to follow what they have done there. Asking webmasters to explicitly indicate if they want to read EXIF data (especially from remote sources) before anything is rendered is IMHO the proper and sane solution.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
Basilisk-Dev
Lunatic
Lunatic
Posts: 323
Joined: 2022-03-23, 16:41
Location: Chamber of Secrets

Re: Image

Unread post by Basilisk-Dev » 2023-07-09, 14:35

I'm definitely don't like the idea of using EXIF data for image rotation. Every time I think developers of "modern" sites can't make ruin the web any further than they have they somehow continue to do it anyways.
Basilisk Project Owner

viewtopic.php?f=61&p=230756

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35651
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: Image

Unread post by Moonchild » 2023-07-09, 16:34

The image decoder and display in the platform does use it for stand-alone images by default (it makes sense there).
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite