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

Why are some SVG-images not visible in my footer?

Not sure if you’ve already done this, so forgive me if I’m telling you something you already know. But WordPress doesn’t support SVG Uploads out of the box, so to speak. This is due to security issues that can be created when a user uploads SVGs with malicious code. Mainly, a problem if you let … Read more

WordPress search form and input type=”image”

You have to use javascript or jQuery for this form. You can use like this: <!– Custom Style for the form –> <style type=”text/css”> body { margin: 0; padding: 30px 0; font-family: arial; font-size: 16px; line-height: 22px; max-width: 800px; margin: 0 auto; overflow: hidden; } body:after { content: ”; clear: both; display: table; } img{ … Read more