WordPress.org

Make WordPress Core

Opened 2 years ago

Last modified 2 years ago

#36239 new defect (bug)

wp-embed image size is using the smallest image or it sometimes uses the one for featured images

Reported by: carasmo Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.4.2
Component: Embeds Keywords:
Focuses: Cc:

Description

When using the wp-embed in my custom post types the image size is correct, a bit big, but it's not blurry. In regular posts, the image size is the thumbnail size created for the media library thumbnail (not the one in the media settings) because that happens to be the smallest one. I noticed that for posts, whatever is the smallest image is being used, whether set in the functions file or by WordPress.

Change History (4)

#1 @swissspidy
2 years ago

#36283 was marked as a duplicate.

#2 @swissspidy
2 years ago

  • Keywords reporter-feedback added

Hey @carasmo,

Welcome to WordPress Trac and thanks for creating this ticket. Sorry for not having received a reply in quite a while.

Could you tell us which image dimensions are configured under Settings -> Media? Also, could you perhaps upload an example image this bug happens with?

It would help a lot reproducing this issue.

Thanks!

#3 @carasmo
2 years ago

I fixed this with the filter 'embed_thumbnail_image_size'. If I recall, I was keeping the image sizes generated by media to very teeny and using them as the img src and and a larger version was used as a data-src. My dimensions for the small version were the same ratio as the large versions shown. However, even though my case is unique, many people have blurry images since their image size for the ratio is sometimes smaller. I don't think many will discover this.

#4 @swissspidy
2 years ago

  • Keywords reporter-feedback removed
Note: See TracTickets for help on using tickets.