Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(cloudinary): update mapping key for density #730

Merged
merged 2 commits into from
Jan 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/content/5.providers/cloudinary.md
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,10 @@ Call a custom function on Cloudinary side. See [Custom Functions](https://cloudi

To define the density number when converting a vector file to image format.

### `aspectRatio`

To crop or resize the asset to a new aspect ratio, for use with a crop/resize mode that determines how the asset is adjusted to the new dimensions.

::alert{type="info"}
See [Cloudinary Image Transformation API](https://cloudinary.com/documentation/image_transformation_reference) for more details.
::
3 changes: 2 additions & 1 deletion src/runtime/providers/cloudinary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ const operationsGenerator = createOperationsGenerator({
zoom: 'z',
colorSpace: 'cs',
customFunc: 'fn',
density: 'dpi'
density: 'dn',
aspectRatio: 'ar',
},
valueMap: {
fit: {
Expand Down