8000 Add functionality to Media objects to leverage Contentful image APIs · Issue #32 · nascentdigital/contentfully · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Add functionality to Media objects to leverage Contentful image APIs #32
Open
@sdedios

Description

@sdedios

Currently the Media objects used to represent assets from Contentful are plain Javascript objects without any functionality, however for certain media types (e.g. images) there exist rich Contentful APIs that provide transforms on the underlying image before serving it up to the client.

I would like to propose changing the Media interface / type to a class hierarchy that has additional functions which would support the broader image API features, such as:

  • Progressive JPEG
  • Image resizing
  • Image cropping
  • etc.

This change would not break compatibility assuming we had a base interface for Media that still looks the same, but then had classes for specific media types such as ImageMedia that then implemented the interface. You could also just have a base class Media that was subclassed - these are minor implementation details.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0