@adonis-agora/media 0.19.0 → 0.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @adonis-agora/media
2
2
 
3
+ ## 0.20.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#190](https://github.com/DavideCarvalho/adonis-agora-media/pull/190) [`e7c4368`](https://github.com/DavideCarvalho/adonis-agora-media/commit/e7c436805d0e05281f6891d8c132fceccc58c505) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - **Image placeholders and blur.**
8
+
9
+ - New `transformers.placeholder()` — a metadata-only transformer that persists, on `record.conversions.placeholder.meta`, a tiny WebP preview as a `data:` URL, the original's dimensions (after EXIF orientation) and its dominant colour. Enough to render a blur-up placeholder with the right aspect ratio in the same response as the image URL, with no extra request or client decoder. Eager by default; skips non-`image/*` and SVG records with `meta: {}`. Needs the `sharp` peer (loaded lazily). Exported as `PlaceholderTransformer` with its `ImagePlaceholder` / `PlaceholderEngine` types.
10
+ - `placeholderOf(record)` reads that placeholder off any `MediaRecord` (whatever the transformer's name), and `storeSingleFile` / `storeSingleFileWith` now also return the record `id` and its `placeholder` (or `null`).
11
+ - `ConversionPreset.blur` — gaussian blur sigma applied after the resize, for blurred variants served as files.
12
+ - **Fix:** the sharp processor now auto-orients from EXIF before resizing. Phone photos taken in portrait used to come out sideways in every conversion, because the output drops the EXIF orientation tag that made the original display upright. Existing conversions are not regenerated.
13
+
3
14
  ## 0.19.0
4
15
 
5
16
  ### Minor Changes