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

Add webpquality support for renditions #130

Merged
merged 3 commits into from
Oct 17, 2020
Merged

Conversation

ruisaraiva19
Copy link
Collaborator

@ruisaraiva19 ruisaraiva19 commented Oct 8, 2020

Resolves #125

By default, all bmp and webp images are converted to the png format when no image output format is given.
The default conversion mapping can be changed (docs here).

{
  image(id: 2) {
    id
    url
    rendition(webpquality: 75) {
      url
    }
  }
}
{
  "data": {
    "image": {
      "id": 2,
      "url": "http://localhost:8000/media/original_images/file_example_WEBP_50kB.webp",
      "rendition": {
        "url": "/media/images/file_example_WEBP_50kB.webpquality-75.png"
      }
    }
  }
}

Copy link
Member

@zerolab zerolab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.
Need to check how Wagtail tackles this, but I wonder what happens when you pass webpquality to a jpeg and viceversa 🤔

@zerolab
Copy link
Member

zerolab commented Oct 9, 2020

48d2e1b makes me think we are missing some tests - would be good to get an idea of the type of query/queries that made you discover the inconsistency.

Nonetheless, let's get this in and follow up with ^

@ruisaraiva19 ruisaraiva19 merged commit e738616 into master Oct 17, 2020
@zerolab zerolab deleted the feat/webp-quality branch January 16, 2021 01:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support webpquality option for renditions
2 participants