In my theme, thumbnails are working just fine for the most part. But when I preview a post by clicking the "Preview changes" button, about 3/4th of the thumbnails on the page are broken. When I test with has_post_thumbnail() or get_post_thumbnail_id(), nothing is returned indicating that no thumbnails are associated with the posts.

Again, the odd thing is everything works just fine on published posts. Any idea the cause?

  • Can you show me the "Live" post url and the "Preview" post url. – Robbert Feb 21 at 8:10
  • The "live" url is https://domain.com/title/ and the "preview" url is https://domain.com/?p=1337&preview=true. Most of the thumbnails for related posts & sidebar widget posts are missing — they're not 404ing, they simply aren't returned. – Thomas Park Feb 22 at 15:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.