Deleted Image giving a 301

from what I see the issue might be in the redirections you are making and how you are making them. I did some research and you can use this (it is Ask Rubi group that has an article on the topic) to learn more about the redirections.

get_post_gallery with Gutenberg

Using birgire’s suggestions, I came up with the following solution that is working well with both the old pre-WP 4.x data and the newer posts that have been added under 5.0. // if there is a gallery block do this if (has_block(‘gallery’, $post->post_content)) { $post_blocks = parse_blocks($post->post_content); $ids = $post_blocks[0][attrs][ids]; } // if there is … Read more

How to “lazy load” post thumbnail

single-post.php: <img src=”<?php the_post_thumbnail_url(‘medium’) ?>” class=”img-fluid rounded shadow-3 mb-1″ alt=”<?php the_title() ?>” loading=”lazy”> the_post_thumbnail_url(‘medium’) Enable support for Post Thumbnails on posts and pages: https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/

How to remove image size inline style in article and include caption

Really not sure why you would want to do something like that. As Jacob Peattie said those dimenstion are there to prevent layout shift when images are being loaded. But if you still want to remove width and height attributes you could do this. add_filter(‘post_thumbnail_html’, ‘bt_remove_post_thumbnail_html_width_height’, 10, 4); function bt_remove_post_thumbnail_html_width_height ($html, $post, $post_thumbnail_id, $size) { … Read more