Skip to content

Commit

Permalink
Merge pull request #1052 from karlcow/1051/1
Browse files Browse the repository at this point in the history
Fixes #1051. Converting PNGs to JPEG
  • Loading branch information
Mike Taylor committed May 19, 2016
2 parents c720361 + 2fb5bb2 commit 1fd891e
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
# Convert PNG 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 1fd891e

Please sign in to comment.