[OJS 3.1.2] Scaling figures/images in eLife Lens Article Viewer


I’m using OJS and the default eLife Lens Article Viewer.

I’ve noticed that, when viewing XML articles in a desktop browser (I use Firefox), figures or images are automatically scaled to match the width of the screen. This is good for when an image is too large, but doesn’t look great when an image is being scaled up.

Is there anything I can do so that lens viewer scales images down when appropriate, but doesn’t scale them up?

I figured out a solution to this. Changing lens.css at line 300 to:

.content-node.figure div .image-wrapper img {
max-width: 100%;
max-height: 85vh; }

By setting max-width and max-height to 100% and 85% of the viewport respectively, it will scale the image down but not up.