All Projects β†’ juliomrqz β†’ Nuxt Optimized Images

juliomrqz / Nuxt Optimized Images

Licence: mit
πŸŒ…πŸš€ Automatically optimizes images used in Nuxt.js projects (JPEG, PNG, SVG, WebP and GIF).

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Nuxt Optimized Images

Lilliput
Resize images and animated GIFs in Go
Stars: ✭ 1,690 (+135.7%)
Mutual labels:  webp, image, gif, jpeg
Libvips
A fast image processing library with low memory needs.
Stars: ✭ 6,094 (+749.93%)
Mutual labels:  webp, svg, gif, jpeg
Grunt Image
Optimize PNG, JPEG, GIF, SVG images with grunt task.
Stars: ✭ 201 (-71.97%)
Mutual labels:  image, gif, jpeg, optimization
Sdwebimage
Asynchronous image downloader with cache support as a UIImageView category
Stars: ✭ 23,928 (+3237.24%)
Mutual labels:  webp, image, gif, jpeg
Sharp
High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, AVIF and TIFF images. Uses the libvips library.
Stars: ✭ 21,131 (+2847.14%)
Mutual labels:  webp, svg, image, jpeg
Gulp Image
Optimize PNG, JPEG, GIF, SVG images with gulp task.
Stars: ✭ 213 (-70.29%)
Mutual labels:  image, gif, jpeg, optimization
Optimizt
CLI image optimization tool
Stars: ✭ 594 (-17.15%)
Mutual labels:  webp, svg, gif, jpeg
Govips
A lightning fast image processing and resizing library for Go
Stars: ✭ 442 (-38.35%)
Mutual labels:  webp, svg, gif, jpeg
Imaginary
Fast, simple, scalable, Docker-ready HTTP microservice for high-level image processing
Stars: ✭ 4,107 (+472.8%)
Mutual labels:  webp, image, gif, jpeg
Flyimg
Dockerized PHP7 application runs as a Microservice to resize and crop images on the fly. Get optimised images with MozJPEG, WebP or PNG using ImageMagick. Includes face detection, cropping, face blurring, image rotation and many other options. Abstract storage based on FlySystem in order to store images on any provider (local, AWS S3...).
Stars: ✭ 762 (+6.28%)
Mutual labels:  webp, image, gif, jpeg
Pixterm
Draw images in your ANSI terminal with true color
Stars: ✭ 782 (+9.07%)
Mutual labels:  webp, image, gif, jpeg
Tiny Site
ε›Ύη‰‡δΌ˜εŒ–
Stars: ✭ 65 (-90.93%)
Mutual labels:  webp, image, jpeg, optimization
Imageprocessor
πŸ“· A fluent wrapper around System.Drawing for the processing of image files.
Stars: ✭ 2,452 (+241.98%)
Mutual labels:  webp, gif, jpeg
Quick Picture Viewer
πŸ–ΌοΈ Lightweight, versatile desktop image viewer for Windows. The best replacement for the default Windows photo viewer.
Stars: ✭ 237 (-66.95%)
Mutual labels:  webp, svg, image
sail
The missing small and fast image decoding library for humans (not for machines) β›΅ https://sail.software
Stars: ✭ 206 (-71.27%)
Mutual labels:  jpeg, gif, webp
gfxprim
Open-source modular 2D bitmap graphics library with emphasis on speed and correctness.
Stars: ✭ 32 (-95.54%)
Mutual labels:  jpeg, gif, webp
imagor
Fast, Docker-ready image processing server in Go and libvips
Stars: ✭ 2,276 (+217.43%)
Mutual labels:  jpeg, gif, webp
Bimg
Go package for fast high-level image processing powered by libvips C library
Stars: ✭ 1,394 (+94.42%)
Mutual labels:  webp, image, jpeg
nuxt-prune-html
πŸ”Œβš‘ Nuxt module to prune html before sending it to the browser (it removes elements matching CSS selector(s)), useful for boosting performance showing a different HTML for bots/audits by removing all the scripts with dynamic rendering
Stars: ✭ 69 (-90.38%)
Mutual labels:  optimization, nuxt, nuxtjs
yoga-image-optimizer
A graphical tool to convert and optimize JPEG, PNG and WebP images (based on YOGA)
Stars: ✭ 85 (-88.15%)
Mutual labels:  optimization, jpeg, webp

Codacy Badge Travis David David version License

πŸŒ… πŸš€ Nuxt Optimized Images

Automatically optimizes images used in Nuxt.js projects (JPEG, PNG, SVG, WebP and GIF).

This module is inspired by the work of Cyril Wanner in next-optimized-images.

Read this in other languages: English, EspaΓ±ol

Features

Image sizes can often get reduced up to 60%, but this is not the only thing @aceforth/nuxt-optimized-images does:

  • Reduces image size by optimizing images during build.
  • Improves loading speed by providing progressive images (for formats that support it).
  • JPEG/PNG images can be converted to WebP on the fly for an even smaller size.
  • Can resize images or generate low-quality image placeholders (lqip) and extract the dominant colors of it.
  • Provides query params for file-specific handling/settings.
  • And supports these features already included in Nuxt.js:
    • Content hash to the file name so images can get cached on CDN level and in the browser for a long time.
    • Inlined small images to save HTTP requests and additional roundtrips.
    • Same URLs for unchanged images over multiple builds for long time caching.

Installation

⚠️ node >= 10 and nuxt >= 2 are required.

npm install --save-dev @aceforth/nuxt-optimized-images

or

yarn add --dev @aceforth/nuxt-optimized-images

Add @aceforth/nuxt-optimized-images to buildModules section of nuxt.config.js:

⚠️ If you are using Nuxt < 2.9.0, use modules instead.

{
  buildModules: [
    '@aceforth/nuxt-optimized-images',
  ],

  optimizedImages: {
    optimizeImages: true
  }
}

See the configuration section for all available options.

⚠️ Images won't get optimized out of the box. You have to install the optimization packages you really need in addition to this module. This doesn't force you to download big optimization libraries you don't even use. Please check out the table of all optional optimization packages.

Optimization Packages

You have to install the optimization packages you need in your project in addition to this module. Then, @aceforth/nuxt-optimized-images detects all the supported packages and uses them.

So you only have to install these packages with npm, there is no additional step needed after that.

The following optimization packages are available and supported:

Optimization Package Description Project Link
imagemin-mozjpeg Optimizes JPEG images Link
imagemin-pngquant Optimizes PNG images Link
imagemin-optipng Alternative for optimizing PNG images Link
imagemin-gifsicle Optimizes GIF images Link
imagemin-svgo Optimizes SVG images and icons Link
webp-loader Optimizes WebP images and can convert JPEG/PNG images to WebP on the fly (WebP resource query) Link
lqip-loader Generates low quality image placeholders and can extract the dominant colors of an image (lqip resource query) Link
responsive-loader Can resize images on the fly and create multiple versions of it for a srcSet. Important: You need to additionally install either jimp (node implementation, slower) or sharp (binary, faster) Link
sqip-loader Loads images and exports tiny SQIP previews as image/svg+xml URL-encoded data Link

Example: If you have JPG, PNG, and SVG images in your project, you would then need to run

npm install --save-dev imagemin-mozjpeg imagemin-pngquant imagemin-svgo

# or

yarn add --dev imagemin-mozjpeg imagemin-pngquant imagemin-svgo

To install all optional packages, run:

npm install --save-dev imagemin-mozjpeg imagemin-pngquant imagemin-gifsicle imagemin-svgo  webp-loader lqip-loader responsive-loader sqip-loader sharp

# or

yarn add --dev imagemin-mozjpeg imagemin-pngquant imagemin-gifsicle imagemin-svgo  webp-loader lqip-loader responsive-loader sqip-loader sharp

⚠️ Please note that by default, images are only optimized for production builds, not development builds. However, this can get changed with the optimizeImagesInDev config.

Documentation & Support

Professional Support

This project is sponsored by me, a Full Stack Developers. If you require Professional Assistance on your project(s), please contact me at https://marquez.co.

Code of Conduct

Everyone participating in this project is expected to agree to abide by the Code of Conduct.

License

Code released under the MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].