Fatal error after update 6.5 – wp-includes/media.php:2134 svg inline sizes equal 0

If you dig into the function wp_img_tag_add_width_and_height_attr, you see the line where it goes wrong: $size_array[1] = (int) round( $size_array[1] * $style_width / $size_array[0] ); Before this there are two places to do something. The first is a filter to bypass generating any widths and heights, which you could use like this: add_filter (‘wp_img_tag_add_width_and_height_attr’, ‘wpse424749_no_height_width’); … Read more

Customize all image captions

Depending on whether the captions are using the same CSS class or HTML tag, you can add a :before pseudo element to the CSS. This will add an image before every <caption> tag on your website. caption:before { content: ”; display: inline-block; background: url(‘your-image-url-here’); background-repeat: no-repeat; background-size: contain; background-position: center center; height: 15px; width: 15px; … Read more

tech