admin管理员组

文章数量:1122832

I have this problem since wordpress was automatically updated by whm/wp-toolkit.

I continued to use the "Media Sync" plugin to return the images to the "Media Library" and it works. So now the images are back in the "Media Library". So "Media Sync" after returning the image to the Media Library does not return it to the Featured Image according to what is uploaded in each post.

  • But now the images in the posts do not appear on the Site/Featured. There is no error that the image is missing from the frontend.

1). I changed the theme and disabled the plugin. permalink, flush media.

2). I downgraded wordpress to 6.6.1,

3). I cleared the cache and disabled the firewall in whm.

4). I also checked the wp_postmeta/wp_posts database, the images are there with the correct url.

After editing a post i get this message:

"wp-json/wp/v2/media/1142808?context=view&_locale=user 404 (Not Found)" and the image is not found within that post.

r/Wordpress - Missing featured image Missing featured image r/Wordpress - wp-json/wp/v2/media wp-json/wp/v2/media All this happened 3 days ago on the day WP/6.6.2 was launched.

Do you have any advice on what else to do?

I have this problem since wordpress was automatically updated by whm/wp-toolkit.

I continued to use the "Media Sync" plugin to return the images to the "Media Library" and it works. So now the images are back in the "Media Library". So "Media Sync" after returning the image to the Media Library does not return it to the Featured Image according to what is uploaded in each post.

  • But now the images in the posts do not appear on the Site/Featured. There is no error that the image is missing from the frontend.

1). I changed the theme and disabled the plugin. permalink, flush media.

2). I downgraded wordpress to 6.6.1,

3). I cleared the cache and disabled the firewall in whm.

4). I also checked the wp_postmeta/wp_posts database, the images are there with the correct url.

After editing a post i get this message:

"wp-json/wp/v2/media/1142808?context=view&_locale=user 404 (Not Found)" and the image is not found within that post.

r/Wordpress - Missing featured image Missing featured image r/Wordpress - wp-json/wp/v2/media wp-json/wp/v2/media All this happened 3 days ago on the day WP/6.6.2 was launched.

Do you have any advice on what else to do?

Share Improve this question asked Sep 13, 2024 at 19:15 OraOra 11 bronze badge
Add a comment  | 

1 Answer 1

Reset to default 0

After a thorough inspection of the database, i saw that the post_type for the images had changed to "post" instead of "attachment".

The solution Update Post mime type from "post_status = inherit" sql:

// Mime type - img/jpeg UPDATE wp_posts SET post_type = 'attachment' WHERE wp_posts.post_status = 'inherit' and wp_posts.post_mime_type = 'image/jpeg';

// Mime type - img/png UPDATE wp_posts SET post_type = 'attachment' WHERE wp_posts.post_status = 'inherit' and wp_posts.post_mime_type = 'image/png';

// Mime type - img/webp UPDATE wp_posts SET post_type = 'attachment' WHERE wp_posts.post_status = 'inherit' and wp_posts.post_mime_type = 'image/webp';

// Mime type - video/mp4 UPDATE wp_posts SET post_type = 'attachment' WHERE wp_posts.post_status = 'inherit' and wp_posts.post_mime_type = 'video/mp4';

本文标签: post thumbnailsMedia Library it doesn39t show any of the uploaded images after updating wordpress 662