nystudio107 / craft-imageoptimize

Automatically create & optimize responsive image transforms, using either native Craft transforms or a service like Imgix, with zero template changes.
https://nystudio107.com/plugins/imageoptimize
Other
235 stars 36 forks source link

Add support for Image optimization/transform services #10

Open khalwat opened 7 years ago

khalwat commented 7 years ago

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 commented 7 years ago

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

khalwat commented 6 years ago

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

superflausch commented 6 years ago

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.

khalwat commented 6 years ago

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

superflausch commented 6 years ago

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.

khalwat commented 6 years ago

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.

matevisky commented 6 years ago

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!

khalwat commented 6 years ago

@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 commented 6 years ago

@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.

AndrewMac commented 5 years ago

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?

alexagui commented 5 years ago

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
zizther commented 4 years ago

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?

khalwat commented 4 years ago

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.

zizther commented 4 years ago

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.

zehfred commented 2 years ago

Are you still considering adding these services, namely TinyPNG?

khalwat commented 2 years ago

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