Hey @ventilator
Right now there isn’t an easy way to do this – we have a bit of complicated setup so we can load SVGs optimally – essentially we register (while a page is loading) different SVGs we use via xlink:href
, and then before the closing body tag we outout those SVGs via PHP – this ensures no SVG is loaded more thank once, and keeps the page size down too.
If you wanted to hack at it, the easiest thing to do would be to replace the SVG in our plugin, but as you mention that’s generally not advisable.
We do plan to an option so you can choose an image from your gallery as the placeholder image, but thats not coming for some time.
* I do have another idea, we have some PHP hooks, so you can filter the output of any of our elements – including the featured image.
You could conditionally check for the existance of the image placeholder in the content, and replace the html with your own:
https://customlayouts.com/documentation/action-filter-reference/
You would need one called custom-layouts/element/render_output
:
add_filter( 'custom-layouts/element/render_output', 'cl_element_render_output', 10, 2 );
I hope that might help until we add this feature!
Thanks
– Ross
-
This reply was modified 3 years, 2 months ago by
Code Amp.