uMazel: How to hook into methods SrcSetManager() and CreatePictureElement()
Hi forum,
I have just taken over on an customers Umbraco project from another Umbraco partner. The partner has implemented the Umbraco site (Umbraco v. 8.12.2) site using uMazel (v. 2.0.0).
I need know to hook into the methods SrcSetManager() and CreatePictureElement() to alter image paths (add CDN prefix), css classes and more...:
<picture>
<source media="only screen and (min-width: 1200px)" srcset="/media/nztauqwu/my-image.jpg?center=x,y&mode=crop&quality=70&width=550">
<source media="only screen and (min-width: 992px)" srcset="/media/nztauqwu/my-image.jpg?center=x,y&mode=crop&quality=70&width=435">
<source media="only screen and (min-width: 768px)" srcset="/media/nztauqwu/my-image.jpg?center=x,y&mode=crop&quality=70&width=325">
<source media="only screen and (min-width: 576px)" srcset="/media/nztauqwu/my-image.jpg?center=x,y&mode=crop&quality=70&width=450">
<source media="only screen and (min-width: 1px)" srcset="/media/nztauqwu/my-image.jpg?center=x,y&mode=crop&quality=70&width=450">
<img src="/media/nztauqwu/my-image.jpg" alt="My alt text" class="myClass">
</picture>
... in for instance the view Views\Partials\SectionBlocks\Cached\SectionImageTextBlock.cshtml:
uMazel author here. Short answer - right now you can't. :(
All methods imply that you're using an IPublishedContent item (i.e. a Media item). I haven't tested stuff with external URLs, but I suspect that ImageProcessor won't work well with those.
Unfortunately we're not providing source code for this at the moment.
uMazel: How to hook into methods SrcSetManager() and CreatePictureElement()
Hi forum,
I have just taken over on an customers Umbraco project from another Umbraco partner. The partner has implemented the Umbraco site (Umbraco v. 8.12.2) site using uMazel (v. 2.0.0).
I need know to hook into the methods SrcSetManager() and CreatePictureElement() to alter image paths (add CDN prefix), css classes and more...:
... in for instance the view Views\Partials\SectionBlocks\Cached\SectionImageTextBlock.cshtml:
But when I go ti the methods definitions, I just end up here ("SrcSetManager (from metadata)") and canĀ“t go further:
How can I hook into the methods?
uMazel author here. Short answer - right now you can't. :(
All methods imply that you're using an IPublishedContent item (i.e. a Media item). I haven't tested stuff with external URLs, but I suspect that ImageProcessor won't work well with those.
Unfortunately we're not providing source code for this at the moment.
Thanks for the info. :)
is working on a reply...