Skip to content

Commit

Permalink
Merge pull request #833 from ZeitOnline/ZO-883_remove-avif-format-due…
Browse files Browse the repository at this point in the history
…-to-incompabilities

ZO-883: remove avif format due to incompabilities of greyscale with b…
  • Loading branch information
stollero authored Aug 22, 2024
2 parents 61ad4d0 + 68e2f5f commit 6f6ffa3
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 12 deletions.
1 change: 1 addition & 0 deletions core/docs/changelog/ZO-883.change
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ZO-883: remove avif format due to incompabilities of greyscale with browsers
1 change: 0 additions & 1 deletion core/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ dependencies = [
"pendulum>=3.0.0.dev0",
"persistent",
"pillow",
"pillow-avif-plugin",
"prometheus-client",
"pyjwt>=2.0.0",
"pyramid_dogpile_cache2",
Expand Down
10 changes: 0 additions & 10 deletions core/src/zeit/content/image/tests/test_imagegroup.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,16 +232,6 @@ def test_create_variant_image_allows_overriding_output_format(self):
image.load()
self.assertEqual('WEBP', image.format)

def test_create_variant_image_allows_overriding_output_format_avif(self):
image = self.group.create_variant_image(
zeit.content.image.interfaces.IVariants(self.group)['square'], format='AVIF'
)
self.assertEqual('image/avif', image.mimeType)
with image.open() as f:
image = PIL.Image.open(f)
image.load()
self.assertEqual('AVIF', image.format)

def test_parse_url_variant(self):
result = self.traverser.parse_url('cinema__300x160__scale_2.25__0000ff')
assert result['variant'].name == 'cinema'
Expand Down
1 change: 0 additions & 1 deletion core/src/zeit/content/image/transform.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import PIL.Image
import PIL.ImageColor
import PIL.ImageEnhance
import pillow_avif # noqa: F401
import zope.component
import zope.interface
import zope.security.proxy
Expand Down

0 comments on commit 6f6ffa3

Please sign in to comment.