Customizes the output of the WP caption shortcode with <picture>
element for different formats.
- create a folder
mu-plugins
inside your WordPresswp-content
folder (unless it exists already) - place the file
modernize-wp-caption-shortcode.php
inside the folder - ensure you have some logic implemented to generate WebP (or any other format you add to the code) separately