Closed ghost closed 8 years ago
You may wanna look at lines 301 - 311
def uploadToCloudinary(imgToUpload): if (os.path.isfile(imgToUpload)): if (os.path.islink(imgToUpload)): imgToUpload = os.path.realpath(imgToUpload) if (imghdr.what(imgToUpload)): response = cloudinary.uploader.upload(imgToUpload) return response['url'] else: return '' else: return ''
I would start here and check the url that is returned. You maybe able to edit that url to add the /q_90/
I looked through the documentation on how to do this through their library that PlexEmail is using and it looks like by default it is already using 90%:
http://cloudinary.com/documentation/image_transformation_reference#quality_parameter
Control the JPEG, WebP, GIF, JPEG XR and JPEG 2000 compression quality. 1 is the lowest quality and 100 is the highest. Reducing quality generates JPG images much smaller in file size. The default values are:
- JPEG: 90
Ah, thank you for taking the time to look through this for me. Looks like we are getting about all the compression from cloudinary we will! Thank you!
Hello, great piece of software works very well. I was hoping for a bit of assistance using JPEGmini to adjust the quality of the files so they load a bit more quickly in emails accessed via mobile. I read this article here:
http://cloudinary.com/blog/optimize_your_jpeg_images_without_compromising_quality_with_jpegmini_and_cloudinary
It looks like "/q_90/" added to the upload URL will reduce the quality and help a bit. I am not sure where to even begin in adding this to the plexemail.py script. Could you provide me with a bit of direction when you have a moment? Thanks again for a great script!