I noticed that my older images are no longer getting resolved by WordPress 5.3.4. – the file doesn’t exist on that path and 404 gets returned.
For images that were originally uploaded to
https://www.example.com/wp-content/uploads/myimage-300x300.jpg
WordPress now looks here
https://www.example.com/wp-content/uploads/sites/1/myimage-300x300.jpg
The function I’m using to resolve image path (none works with old images):
https://developer.wordpress.org/reference/functions/get_the_post_thumbnail_url/
<img class="full-size" src="<?php echo get_the_post_thumbnail_url($row['ID'], "medium"); ?>">
https://developer.wordpress.org/reference/functions/the_post_thumbnail/
<?php the_post_thumbnail( 'medium' ); ?>
I’m using WordPress Multisite for several years already and never had this problem. Before, the older images of the used to be directly in wp-content/uploads/
directory.
The change could either be part of a WordPress update or a side effect of the newly installed Elementor plugin.
How to overcome this change?
- Hiện tại chúng tôi có hơn 25 nghìn bài văn mẫu các thể loại.
- Kho tài liệu, đề thi học sinh giỏi các lớp vô cùng phong phú.
- Mỗi ngày cập nhật hơn 100 đề thi chất lượng từ các website bán tài liệu lớn.
Tải đề thi VIP với giá siêu rẻ tại Vip.Dethihsg247.Com