Repository navigation
feat: normalised media and a CDN for the uploads (0.5) - #13
Merged
Merged
Conversation
- NormalizedMedia: a file in one shape whatever its kind (url, sizes, srcset, alt, caption, dimensions, duration, focal point from pollora/media)
- GET /wp-json/headless/v1/media/{id}; headless_featured_media field of posts, computed only when _fields names it (OptInField)
- MediaUrls and MediaCdn: the uploads served from a CDN in the address, srcset and content, not in the administration
- A file attached to a draft is visible to those who can see the draft
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Third slice of 0.5.
GET /headless/v1/media/{id}gives an image, a video, a sound or a document with the same keys (url, sizes, srcset, alt, caption, width, height, filesize, duration, modified). The focal point is the one set with pollora/media (_pollora_focal_point, and itspollora/media/focal_pointfilter), null without it.headless_featured_mediaon posts, computed only when_fieldsnames it (WordPress computes every registered field otherwise).media.cdn_urlswaps the uploads address for the CDN's in a file's address, srcset and the HTML of the content; the administration keeps WordPress addresses.read_postis no use on an attachment's 'inherit' status).