Closed mark-chief closed 2 years ago
Hello, is there way to conditionally add a class to an image based on a set width?
E.g if image width is larger than container div 640px wide then add class="img-fluid".
class="img-fluid"
Context behind this is to ensure that images in a redactor field scale to fit their container size. but only images that are too big.
Thanks
Nope, sorry. That would require some kind of closure support in order to evaluate each node/image, which Retcon currently doesn't have.
Hello, is there way to conditionally add a class to an image based on a set width?
E.g if image width is larger than container div 640px wide then add
class="img-fluid"
.Context behind this is to ensure that images in a redactor field scale to fit their container size. but only images that are too big.
Thanks