Image Tag Helper base 64

 

In ASP.NET Core exista un image tag helper – care e bun – adauga si versiunea daca vrei.

Am creat un Image Tag Helper base 64 . Ce face –e simplu : pune imaginile inline in HTML conform cu specificatia https://en.wikipedia.org/wiki/Data_URI_scheme .

Cum se foloseste ?

<img src=’~/ relative path to the image ‘ asp-render-base64=’true’ />

Unde se foloseste?
De exemplu, daca vreti sa trimiteti un html ca atasament care sa aiba imaginile direct in el.

Unde gasiti sursele?

https://github.com/ignatandrei/AspNetCoreImageTagHelper

NuGet ?

NuGet Package at https://www.nuget.org/packages/AspNetCore.Mvc.ImageBase64/

De ce nu e in ASP.NET MVC ?

Am facut un pull request. Nu l-au aprobat ( au spus ca nu e in scope)

Totusi, l-au listat pe https://github.com/aspnet/mvc in readme.md

Leave a Reply

Your email address will not be published. Required fields are marked *