Fit
There are 4 ways to fit an image into a fotorama:
'contain'
Default
Stretching the image to be fully displayed while fitting within the fotorama.'cover'
Stretching and cropping the image to completely cover the fotorama.'scaledown'
Stretching the image if it is bigger than the fotorama.'none'
Using the image’s own dimensions.
Select fit for the whole fotorama and override it for a single image with data-fit
:
<div class="fotorama"
data-fit="cover">
<img src="1.jpg">
<img src="2.jpg" data-fit="contain">
</div>
Examples
The 200×300 frog:
...fit the 240×180 fotorama like so:
The 200×125 elephant:
...fit the 240×180 fotorama like so:
Fit thumbnails
All of this applies to thumbnails via data-thumbfit
.