Skip to content

Commit

Permalink
fix webcompat#1051 Converting PNGs to JPEG
Browse files Browse the repository at this point in the history
  • Loading branch information
karlcow committed May 19, 2016
1 parent 87f464a commit 40535b7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions webcompat/api/uploads.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ def save(self):
# Optimize further the image compression for these formats
if self.image_object.format in ['JPEG', 'JPG', 'JPE', 'PNG']:
save_parameters['optimize'] = True
# Converting PNGs to JPEG. See Issue #1051
file_dest = 'jpg'.join(file_dest.rsplit('png', 1))
# If animated GIF, aka duration > 0, add save_all parameter
if (self.image_object.format == 'GIF' and
self.image_object.info['duration'] > 0):
Expand Down

0 comments on commit 40535b7

Please sign in to comment.