All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Remove install from release CI config
- Fix asset not using requested content type when specified
- Fix asset not being correctly output when retrieved from cache
- Verify resolvers throw errors on empty result and error is thrown on failed transformations
- Simplify loader implementation for easier readability
- Move resolver error throwing from loader into resolver
- Retrieve content type for cached assets
- Replaced built-in LRU cache with npm package
lru-cache
- Remove
remix-image
from dependencies (added accidentally through automation)
- Update
js-image-lib
to fix incorrect size used for resizing
- Replaced
utif
withdecode-tiff
for smaller size - Update
mime-tree
to0.1.4
to fix incorrect mime detection
- Added
basePath
property toLoaderConfig
andResolver
to allow custom base paths for assets
- Replaced
hybrid-disk-cache
package with the updated version@next-boost/hybrid-disk-cache
- Added Vercel deployment example
- Replaced functions in examples with best practices (file cache, sharp)
- Mark package as side-effect free
- Replaced built-in
pureTransformer
code with the libraryjs-image-lib
(which is the same code, but moved to its own library for better developer experience.) - Replaced built-in mime type detector code with the library
mime-tree
- Added
crop
parameter toTransformOptions
to allow cropping of images. - Added
flip
parameter toTransformOptions
to allow mirroring of images. - Added
rotation
parameter toTransformOptions
to allow rotation of images. - Added
blurRadius
parameter toTransformOptions
to allow Gaussian blur of images.
- Added
options
parameter to resolver type to enable external API transformations
- Added an optional
fallbackTransformer
parameter toLoaderConfig
. Set topureTransformer
by default, this option lets you choose which transformer the loader will fall back to if your custom transformer fails or if the content type is not supported. - Added an optional
skipFormats
parameter toLoaderConfig
. This is a set of mime types that should be returned without transformation. Defaults toSet([MimeType.SVG])
.
- Made
null
a valid option for thetransformer
parameter ofLoaderConfig
. If this parameter is set to null, image transformation will be skipped.
- Added documentation for
LoaderConfig
parameters:defaultOptions
,redirectOnFail
, andskipFormats
. - Added default (
pureTransformer
) supported file types to documentation.
- Added
url
parameter to transformer function to enable external transformer API usage
- Added extra level of URI encode on url to preserve image src query
- Added additional
src
decode on server for images that include query
- Fixed Image query using wrong format if
src
property included its own query string
- Replaced
bmp-js
with@wokwi/bmp-ts
for improved platform support. - Replaced instances of
Buffer
withUint8Array
- add supported content type fields to transformers
- modify how transform defaults are set and their types
- Simplify transformers by removing buffer dependency for external transformers, move sharp transformer to examples, and create wasm transformer
- BREAKING: Modified transformer to use a new function type, Sharp can no longer be passed in as is
- Updated docs to use new transformer format
- Created multiple new examples for various transformers
- Created documentation for new usage of Sharp
- Created documentation website at remix-image.mcfarl.in
- Updated
package.json
to include link to docs website - Simplified
README.md
, moving most info to docs website
- Removed Jimp due to Node dependencies and replaced with pure JavaScript image transformations.
- Created a resolver for Cloudflare KV.
- Moved image transformation logic into separate files to later support additional platforms.
- Created new image transformer that uses Jimp to transform images with pure JavaScript.
- Switched default image transformer to Jimp support all platforms by default
- BREAKING: Modified Cache setup to use class instances to later support additional platforms.
- Created new MemoryCache that does not store files on the file system (for platforms that do not support file system access like Cloudflare)
- Add keywords to
package.json
- Change license to MIT
- Fix sub-export types directory
- Update repo with npm package info
- First public release.
- Fix Rollup issues preventing publishing