You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice if it were possible to set our own attributes to the picture- and/or img-tag.
For example we have a case where an image would use micro format schema and having an "itemprop" on the img tag.
But also some more advanced scenarios where a data attribute was applied.
Have you looked in to custom taghelpers? They are pretty useful for these type of helpers, I really like https://github.com/Jeavon/Slimsy
and i think something similar would work nice with PictureRenderer and PictureRenderer.Optimizely.
The text was updated successfully, but these errors were encountered:
Hi @seanhakbb , take a look at v3.12. It's now possible to add any attribute to the img element.
Note that this version introduces the PictureAttributes object which is sent in as a parameter to Picture.Render. From now on you use the PictureAttributes object for several settings. Some settings have been moved from the PictureProfile to the PictureAttributes object.
I have not created a taghelper or HTML-helper, because this library is also used in Blazor applications. I recommend creating your own HTML helper as a wrapper around PictureRenderer.
Hello and thanks for a great plugin!
It would be nice if it were possible to set our own attributes to the picture- and/or img-tag.
For example we have a case where an image would use micro format schema and having an "itemprop" on the img tag.
But also some more advanced scenarios where a data attribute was applied.
Have you looked in to custom taghelpers? They are pretty useful for these type of helpers, I really like https://github.com/Jeavon/Slimsy
and i think something similar would work nice with PictureRenderer and PictureRenderer.Optimizely.
The text was updated successfully, but these errors were encountered: