diff --git a/docs/topics/images.rst b/docs/topics/images.rst index 16883f4213..a021e9ed6d 100644 --- a/docs/topics/images.rst +++ b/docs/topics/images.rst @@ -203,9 +203,9 @@ Output image format Wagtail may automatically change the format of some images when they are resized: - - PNG and JPEG images always won't change format + - PNG and JPEG images don't change format - GIF images without animation are converted to PNGs - - BMP images are always converted to PNGs + - BMP images are converted to PNGs It is also possible to override the output format on a per-tag basis by using the ``format`` filter after the resize rule. @@ -237,8 +237,15 @@ quality: # Make low-quality but small images WAGTAILIMAGES_JPEG_QUALITY = 40 -Note that this won't affect any previously generated images. You may want to -delete all renditions so they can regenerate with the new setting. +Note that this won't affect any previously generated images so you may want to +delete all renditions so they can regenerate with the new setting. This can be +done from the Django shell: + +.. code-block:: python + + # Replace this with your custom rendition model if you use one + >>> from wagtail.wagtailimages.models import Rendition + >>> Rendition.objects.all().delete() Changing per-tag ^^^^^^^^^^^^^^^^ diff --git a/wagtail/wagtailimages/models.py b/wagtail/wagtailimages/models.py index 4f0751ff2d..b4511b220b 100644 --- a/wagtail/wagtailimages/models.py +++ b/wagtail/wagtailimages/models.py @@ -417,8 +417,7 @@ class Filter(models.Model): 'original-format': original_format, } for operation in self.operations: - # Check that the operation can take the new "env" argument - # (added in Wagtail 1.5) + # Check that the operation can take the "env" argument try: inspect.getcallargs(operation.run, willow, image, env) accepts_env = True diff --git a/wagtail/wagtailimages/tests/test_image_operations.py b/wagtail/wagtailimages/tests/test_image_operations.py index b2270e6103..70e90cf346 100644 --- a/wagtail/wagtailimages/tests/test_image_operations.py +++ b/wagtail/wagtailimages/tests/test_image_operations.py @@ -414,7 +414,7 @@ class TestFilter(TestCase): self.assertEqual(run_mock.call_count, 2) def test_runs_operations_without_env_argument(self): - # The "env" argument was added in Wagtial 1.5. This tests that + # The "env" argument was added in Wagtail 1.5. This tests that # image operations written for 1.4 will still work run_mock = Mock()