Content Block - can I stop generating picture tags for images?
Permalink
I want to stop using the <picture> and <source> tags for images and just use simple <img> tags
for example, my goal is to change this image structure
to the following
I modified the Image Block and it worked.
But how to do the same for images inside Content Block?
I'm using the latest version of Concrete5
for example, my goal is to change this image structure
<picture> <source srcset="thumb1.jpg" media="(min-width: 1200px)"> <source srcset="thumb2.jpg" media="(min-width: 992px)"> <source srcset="thumb3.jpg" media="(min-width: 600px)"> <source srcset="thumb4.jpg" media="(min-width: 320px)"> <img src="main-image.jpg"> </picture>
to the following
<img src="main-image.jpg">
I modified the Image Block and it worked.
But how to do the same for images inside Content Block?
I'm using the latest version of Concrete5
The image element type in the Content block is handled by the LinkAbstractor class. This file would need to be modified.
https://github.com/concrete5/concrete5/blob/develop/concrete/src/Edi...
I think you would need a service provider override to add your modifications.
https://documentation.concrete5.org/tutorials/override-almost-any-co...