Device Pixel Ratio Image Tag Helper #23 - Asp.Net Core 2

Опубликовано: 16 Февраль 2026
на канале: Exciton Interactive LLC
99
3

If you liked the video please subscribe to our channel. Visit https://www.excitoninteractive.com/ar... to see the code for this video.

Please join us on:
************************
Facebook -   / xcinteractive  
Twitter -   / xcinteractive  
Google+ - https://plus.google.com/b/10481223491...

Article Abstract
************************
In this article we will create a new image tag helper that will take care of creating
img tags that will respond to the device pixel ratio (DPR) of the users device. This
allows us to serve a higher pixel density image for devices that can make use of it
while saving a users data by sending down a smaller image for lower resolution devices.
In this process of doing this we will create a base class that both of our tag helpers
can inherit from which will allow us to keep our code as DRY as possible.

Credits
************************
Clap Along by Audionautix is licensed under a Creative Commons Attribution license https://creativecommons.org/licenses/...
Artist: http://audionautix.com/