Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image url and size #1

Open
vonloxx opened this issue Feb 24, 2019 · 0 comments
Open

Image url and size #1

vonloxx opened this issue Feb 24, 2019 · 0 comments

Comments

@vonloxx
Copy link
Member

vonloxx commented Feb 24, 2019

Looking at code here:
https://github.com/front/g-section-row/blob/master/src/section-row/index.js#L242-L247
I think there's going to be issues:

  • According to WP API reference (https://developer.wordpress.org/rest-api/reference/media/), there's no sizes property at media object anymore. It's located at media_details property. So it should get from media.media_details.sizes.large.source_url.
  • Still, I think the block shouldn't get a specific size image. Should get the original and/or add a sidebar option to let the user choose. Not sure how it work in WP but in Drupal the image styles/sizes can be altered and, for example the large size option may not exist.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant