NaturalHeight: 381 About the Introduction of Content-DPR to Gyazo images NaturalHeight: 762 After (with Content-DPR header) Currently, only Chrome is supported, so please look at it with Chrome. Currently the Content-DPR header is supported by Google Chrome with the naturalWidth and naturalHeight calculated and used at the time of display.Ī sample is presented below. If the client such as a modern browser supports them, the Content-DPR header details are acquired at the time of display and will be used to determine the appropriate size for the content. The solution to this problem is the Content-DPR header. Of course, screenshots uploaded to Gyazo were the same. For example, when embedded in HTML, a screenshot taken on a Retina display would be displayed at double the original size in both the vertical and horizontal directions. Until now, when displaying an image in HTML, it was done without considering the DPR of the content itself. The Content-DPR header details are now written as one of the HTTP Client Hints according to the editor’s draft of the 7th edition HTTP Client Hints specification, removed from the IETF Draft, and are in the process of being included in the HTML specification as of a few days before this article was written.Īs the name suggests, this is a header that can notify the client of the DPR (Device Pixel Ratio) of the content being delivered. The information in this article is accurate at the time it was written. In this article, I decided to focus on how images delivered by Gyazo are using the Content-DPR header. No more undesirably huge screenshots of tiny things. TLDR To have your retina/4k images/screenshots viewed at the correct size on any device you can use Gyazo links or embeds. The header makes screenshots with a Device Pixel Ratio greater than 1 display at the proper size on all screens and it’s only possible on Gyazo. This week we added support for the Content-DPR header to all screenshots and images shared with Gyazo, potentially a world first. Original post by Pasta-K, Nota Software Engineer on.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |