craft-imageoptimize icon indicating copy to clipboard operation
craft-imageoptimize copied to clipboard

Add support for Image optimization/transform services

Open khalwat opened this issue 7 years ago • 16 comments

Some people have shared/managed hosting where tools like jpegoptim, etc. can't be installed.

Consider adding support for API image transforms for ~~Imgix~~, Cloudinary, kraken.io, and ImageOptim

khalwat avatar Sep 08 '17 18:09 khalwat

Also consider adding Imgix and Cloudinary support, if that makes sense as well

khalwat avatar Sep 08 '17 18:09 khalwat

Imgix has been added... the others will be pretty easy to add, too.

khalwat avatar Nov 03 '17 07:11 khalwat

TinyPNG would also be a nice addition. It offers a free tier for up to 500 images per month, which is sufficient in many cases. We use Andrés imager plugin for several Craft 2 projects, which worked well in combination with TinyPNG.

Cheers.

superflausch avatar Nov 10 '17 16:11 superflausch

Probably a silly question, but I assume it does more than just PNGs?

khalwat avatar Nov 10 '17 16:11 khalwat

Yes, it supports JPEGs next to the obvious PNGs.

We are happy with the results and also google (or its tools) seemed satisfied with the optimised images. In contrast to the other services (if I am correct) you mention it doesn't host optimised images, you get them as back to store locally.

superflausch avatar Nov 10 '17 16:11 superflausch

I'll have to take a look at their API; the lack of them hosting the images might actually make it slightly more difficult to implement.

khalwat avatar Nov 10 '17 17:11 khalwat

This is a dealbreaker for me right now. We are using cloudanry almost everywhere on the site... I really lover your work @khalwat so it would be an immediate go if you can do this development. Right now we are not able to use seomatic either:( because if this issue... I mean the automatic transformer is not working at all because our external system is cloudanry... So I hope you will have the time to finish this up!

matevisky avatar Apr 13 '18 01:04 matevisky

@matevisky Thanks for chiming in!

You can still use SEOmatic actually, you'd just use Twig to set the SEO images as you see fit:

https://github.com/nystudio107/craft-seomatic#twig-templating

khalwat avatar Apr 13 '18 14:04 khalwat

@matevisky If you want to use ImageOptimize with Cloudinary, install the Cloudinary plugin that will make Cloudinary available as a file system for Craft CMS 3.

khalwat avatar Apr 14 '18 17:04 khalwat

Tim Kelty has a warning that his Cloudinary plugin is not in active development. Any chance you might one day (no pressure) think about providing built-in support?

AndrewMac avatar Nov 02 '18 09:11 AndrewMac

Adding a vote 👍 for Kraken.io support. Their compression is very impressive.

For example, I took a 1.7MB hero banner.jpg and ran it through ImgOptim (Mac app) and it got it down to 1.5 MB.

I took the 1.5MB file and ran it through Kraken and it got it down to 546KB.

kraked-banner

alexagui avatar Jan 31 '19 14:01 alexagui

Does it look like there will be built in support for Cloudinary, or will it always rely on a 3rd party plugin to support Cloudinary on the fly system?

zizther avatar Feb 04 '20 19:02 zizther

Cloudinary is different from other services, in that you have to upload the files to Cloudinary first, it doesn't automatically pull them the way that Imgix does.

Because of this, it probably makes more sense as a Volumes driver of some kind, and then along with it a layer of support from ImageOptimize @zizther

I'm open to looking into it if the demand is there.

khalwat avatar Feb 05 '20 12:02 khalwat

Thanks @khalwat One of the main features I like with Cloudinary is the auto cropping feature, which services like Imgix (which I also use) does not offer https://cloudinary.com/documentation/image_transformations#automatic_cropping_g_auto

I am speaking with Imgix to find out if they are working on a similar feature and the roadmap.

zizther avatar Feb 05 '20 12:02 zizther

Are you still considering adding these services, namely TinyPNG?

zehfred avatar Nov 10 '21 12:11 zehfred

Still considering... there just hasn't been a large demand thus far.

khalwat avatar Nov 10 '21 19:11 khalwat