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