プロジェクト

全般

プロフィール

Vote #78180

完了

Support high resolution images in formatted content

Admin Redmine さんが約2年前に追加. 約2年前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Text formatting_26
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
26
version_id:
119
issue_org_id:
24922
author_id:
347
assigned_to_id:
1
comments:
7
status_id:
5
tracker_id:
2
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

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":http://stackoverflow.com/questions/8785643/what-exactly-is-device-pixel-ratio of 2. Similarly, @@3x@ would be used for a DPR of 3.

"Modern browsers":http://caniuse.com/#feat=srcset 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":https://support.plan.io/projects/planio-support-en/wiki/Import_issues_into_Planio_via_CSV_files - the embedded images are using the mechanism and look crisp and sharp on hi-res displays.


journals

Thank you for the patch.

I am always annoyed whit this @2x images issue. When I attach screenshots which was taken with Mac, I have to half the resolution of the image before upload to prevent the images are displayed at too large size.

With this patch, what I have to do is only renaming the file name to "*@2x.(jpg|png)". It would be great if the patch is merged.

!screenshot-24922.png!
--------------------------------------------------------------------------------
Most browsers even Microsoft Edge supports @srcset@ attribute: http://caniuse.com/#search=srcset
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Related: I've also provided patches for hi-res support in Gravatars and Thumbnails, see #24927.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Setting target version to 3.4.0 along with #24927.
--------------------------------------------------------------------------------
Committed with a test, thanks.
--------------------------------------------------------------------------------


related_issues

relates,Closed,24927,Render high resolution Gravatars and Thumbnails
relates,New,11757,Add support for HDPI screens (retina)

Admin Redmine さんが約2年前に更新

  • カテゴリText formatting_26 にセット
  • 対象バージョン3.4.0_119 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0