Thread Locked This thread is locked - replies are not allowed.


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 9 - Pages: 1 - Last Post: 14 Nov 23, 20:28 Last Post By: wiener30 Threads: [ Previous | Next ]
wiener30

Posts: 22
Registered: 8-Sep-2009
How do Variants work ?
Posted: 14 Nov 23, 13:15
 
I have selected the following settings as in a screenshot:

Image bounds: 10000x800
Scale Variant 1: 1.0
Scale Variant 2: 1.35

jAlbum produces two images exactly as expected: one with vertical side=800 and another with vertical side=1080.

But the skin does not display the smaller image. It fills first the browser window, I assume, with the scaled down 1080-image. The zoom button displays then the1080-image.

How to display the smaller nx800 image?
Laza

Posts: 1,419
Registered: 6-Sep-2005
Re: How do Variants work ?
Posted: 14 Nov 23, 14:31   in response to: wiener30 in response to: wiener30
 
The smaller image is used when the screen is smaller, and the 800px high is enough. When the screen is large enough, I don't see why would anybody want to see the smaller one.
RobM

Posts: 3,949
Registered: 4-Aug-2006
Re: How do Variants work ?
Posted: 14 Nov 23, 14:49   in response to: wiener30 in response to: wiener30
 
For how variants work see https://jalbum.net/help/en/jAlbum/Settings/Images#Variants
Extract: ‘Variants are additional thumbnail and slide images that skins can use to serve optimally sized images for the device being used. For a mobile phone a small image will be loaded, whilst for a HD desktop a larger than the default image (image bounds) can be served...’
JeffTucker

Posts: 8,062
Registered: 31-Jan-2006
Re: How do Variants work ?
Posted: 14 Nov 23, 15:13   in response to: RobM in response to: RobM
 
Attachment ss012054.png (25.6 KB)
The original reason for the invention of srcset, ten years ago, was to compensate for the lack of bandwidth for mobile devices. That's no longer true, so you can essentially make the slide images as large as you'd like, and be done with it.

But that said, if you want to see the possible use of variants today, try this. Feed full-size original images to jAlbum. Set the image bounds to 1920x1080 (I don't understand why the skin defaults to bounds that are smaller than most monitors). Now choose only one variant, for the slide images, of 2.0 JPEG (avoid the WebP variants - the quality is lousy). View the album. Click on the slide image to zoom in to it.

Settings screenshot attached.
Laza

Posts: 1,419
Registered: 6-Sep-2005
Re: How do Variants work ?
Posted: 14 Nov 23, 16:59   in response to: JeffTucker in response to: JeffTucker
 
The WebP writer now generates much nicer pictures, albeit not as small as the lousy version.
wiener30

Posts: 22
Registered: 8-Sep-2009
Re: How do Variants work ?
Posted: 14 Nov 23, 17:02   in response to: wiener30 in response to: wiener30
 
I have read docs related to Variants and jAlbum creates exactly the images which are specified in Variants. And I have reproduced the settings suggested by JeffTucker.

My idea to use variants was:

o) small size images, e.g. nx800px, can be browsed faster. (I see a lot of websites where images are loaded with delay, and it is a bit annoying.)
o) if the image is of interest, it can be displayed in a higher resolution, created by jAlbum for the best quality.
o) images resized by jAlbum have better quality (should have because of sharpening and resizing method) than the images resized by a browser. This is also valid for mobile devices.

What the skin is doing, it is actually ignoring the smaller image and delivers responsibility to the browser, as I understand it.
And it depends on a resolution of a monitor. I have two monitors: 1920x1080 and 2880x1080, and the behavior on these monitors is different. It seems the higher resolution monitor upscales even the bigger image to fill the screen. There is a Scale setting in Display Settings, and it has a big influence on how images are displayed.

Are there any other skins which preserve the image sizes created by jAlbum according to specification in Variants?
JeffTucker

Posts: 8,062
Registered: 31-Jan-2006
Re: How do Variants work ?
Posted: 14 Nov 23, 18:22   in response to: wiener30 in response to: wiener30
 
jAlbum never upscales images. The image bounds are just that, bounds. They're not a target size. This is true of the variants as well.

And to the best of my knowledge, the Plain skin never lets the browser upscale images. On a larger monitor, it's choosing the larger variant, and letting the browser downscale it to fit the viewport. It uses the smaller image only if the viewport is actually smaller than the small image.
JeffTucker

Posts: 8,062
Registered: 31-Jan-2006
Re: How do Variants work ?
Posted: 14 Nov 23, 19:12   in response to: JeffTucker in response to: JeffTucker
 
I don't think there's any skin that would always show the smaller image, but then allow zooming in on the larger variant upon demand.

I believe the only way to get close to that is to skip the variants, and just include the originals along with the scaled images. If the visitor wants to see the larger image, virtually every skin then allows him to download the full-sized original.
JeffTucker

Posts: 8,062
Registered: 31-Jan-2006
Re: How do Variants work ?
Posted: 14 Nov 23, 19:53   in response to: Laza in response to: Laza
 
Laza wrote:
The WebP writer now generates much nicer pictures, albeit not as small as the lousy version.

Just ran my standard test, using an image with a blue sky with puffy clouds. To get the WebP version to appear as smooth as the JPG version, you have to push the WebP quality all the way to 85%, vs. JPG quality of 75%. And guess what. The resulting WebP file is larger than the JPG file.

There's just no point using it, unless you really don't care about the quality of the images. If all you want is smaller files, you can just dial the JPG quality down.
wiener30

Posts: 22
Registered: 8-Sep-2009
Re: How do Variants work ?
Posted: 14 Nov 23, 20:28   in response to: JeffTucker in response to: JeffTucker
 
Ok, thank you.
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums