Download the PHP package meekmedia/image-optimizer without Composer

On this page you can find all versions of the php package meekmedia/image-optimizer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package image-optimizer

Image Optimizer

Private, client-side image compression for any PHP site. Drop in a widget that compresses JPEG, PNG and WebP in the visitor's browser with the same WebAssembly codecs used by Google's Squoosh app (MozJPEG, libwebp, OxiPNG) - images never touch your server, so it works on the cheapest shared hosting and scales for free.

Built by Meek Media.

Why

Install

Composer

No Composer? Download the release zip, unzip it anywhere PHP can read, and require '<path>/image-optimizer/autoload.php';.

Quick start

  1. Publish the static assets into your public web root:

  2. Render the widget:

That's it. See examples/plain-php/ for a runnable page.

Upgrading

After updating the package (Composer or the release zip), re-run the publish step so the new static assets land in your public web root:

Asset URLs are version-busted (?v=...), so browsers and CDNs with long-lived cache headers pick up the republished files automatically - no manual cache purge needed.

Options (render config)

Key Default Meaning
formats ['webp','mozjpeg','oxipng'] Formats offered in the select. 'auto' keeps each image's own format.
defaultFormat 'webp' Pre-selected format.
quality 80 1-100. Ignored by OxiPNG (lossless).
resize false Show a max-dimension input (fit-within, never upscales).
maxFiles 20 Batch limit per drop.

Advanced (JS-only, via MeekImageOptimizer.mount(el, options)): strings to override every UI string, and onFileComplete / onBatchComplete / onError callbacks. A headless API is also exposed: MeekImageOptimizer.create({assetsBase}).then(o => o.compress(file, opts)).

Notes

Theming

The widget is styled entirely through CSS custom properties - set them on .mio-root:

Dark mode: redefine the same variables under your dark scope (e.g. .dark .mio-root { ... }).

Server notes

Browser support

Evergreen Chrome, Edge, Firefox, Safari (incl. iOS). Older browsers get the canvas fallback automatically.

Attribution & license

Apache-2.0. Bundles WebAssembly codecs from jSquash, derived from Google's Squoosh (both Apache-2.0) - "Squoosh" is used for attribution only; this project is not affiliated with Google. ZIP support by fflate (MIT). See THIRD_PARTY_NOTICES.md.


All versions of image-optimizer with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package meekmedia/image-optimizer contains the following files

Loading the files please wait ...