original_docstring: Overrides the save method to optimize the collection_list picture size.
docstring: Overrides the save method to optimize the collection_list picture size.
docstring_tokens: Overrides the save method to optimize the collection_list picture size .
code: def save(self, *args, **kwargs):
          """Overrides the save method to optimize the collection_list picture size."""
          super().save(*args, **kwargs)
          cover_image = Image.open(self.collection_list.path)
          if cover_image.height > 1080 or cover_image.width > 1920:
              cover_image.thumbnail((1920, 1080))
              cover_image.save(self.collection_list.path)
code_tokens: def save ( self , * args , ** kwargs ) : super ( ) . save ( * args , ** kwargs ) cover_image = Image . open ( self . collection_list . path ) if cover_image . height > 1080 or cover_image . width > 1920 : cover_image . thumbnail ( ( 1920 , 1080 ) ) cover_image . save ( self . collection_list . path )
short_docstring: Overrides the save method to optimize the collection_list picture size.
short_docstring_tokens: Overrides the save method to optimize the collection_list picture size .
comment: """Overrides the save method to optimize the collection_list picture size."""