Project

General

Profile

Actions

Feature #24922

closed

Support high resolution images in formatted content

Added by Jan from Planio www.plan.io about 7 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Normal
Category:
Text formatting
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed

Description

Today, many computers have high resolution displays (e.g. Apple's retina screens) and it would be nice if images embedded into Redmine via the !image.png! syntax would make use of the higher resolution.

It has become quite common to use @2x in the filename of such hi-res images, e.g. image@2x.png would indicate that this image is meant for a hi-res display with a device pixel ratio of 2. Similarly, @3x would be used for a DPR of 3.

Modern browsers support supplying these image files in img tags via the srcset attribute and will scale the images automatically on hi-res displays.

The attached patch implements recognition of hi-res images by looking for @2x, @3x, etc. in the file name and will add a srcset attribute accordingly.

As an example, have a look at this wiki page - the embedded images are using the mechanism and look crisp and sharp on hi-res displays.


Files


Related issues

Related to Redmine - Feature #24927: Render high resolution Gravatars and ThumbnailsClosedJean-Philippe Lang

Actions
Related to Redmine - Feature #11757: Add support for HDPI screens (retina)New

Actions
Actions

Also available in: Atom PDF