Skip to content

Media library fails to load if the site has a small media #12989

@hichamboushaba

Description

@hichamboushaba

WordPress by default generates smaller alternative versions of uploaded media, when the uploaded media is already small, it doesn't, and this leads to an error: The property media_details.sizes will be empty, and instead of being returned as an empty object, it's returned as an array: https://a8c.sentry.io/issues/3946742926

This wasn't occurring frequently, but with the last update to switch to the /wp/v2 endpoint (#12836), this will become more serious.
This issue happens only when using Jetpack CP, so the last change in #12836 won't cause any spike.

The issue was identified here woocommerce/woocommerce-ios#14444 (comment)

Metadata

Metadata

Labels

feature: product detailsRelated to adding or editing products, includes product settings.priority: mediumPlanned tasks usually belonging to ongoing projectstype: bugA confirmed bug.

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions