gatsby-transformer-cloudinary
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -0,1 +1,8 @@ | ||
# Version 1.0.1 | ||
Other changes: | ||
- Added CloudinaryAssetFluidLimitPresentationSize fragment. | ||
- Added presentationHeight and presentationWidth to CloudinaryAssetFluid. | ||
# Version 1.0.0 | ||
@@ -2,0 +9,0 @@ |
@@ -52,4 +52,2 @@ const fs = require('fs-extra'); | ||
height: Float | ||
presentationHeight: Float | ||
presentationWidth: Float | ||
src: String | ||
@@ -63,2 +61,4 @@ srcSet: String | ||
base64: String! | ||
presentationHeight: Float | ||
presentationWidth: Float | ||
sizes: String! | ||
@@ -65,0 +65,0 @@ src: String! |
{ | ||
"name": "gatsby-transformer-cloudinary", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Transform local files into Cloudinary-managed assets for Gatsby sites.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -190,2 +190,21 @@ # gatsby-transformer-cloudinary | ||
### Avoiding stretched images using the fluid type | ||
As mentioned previously, images using the fluid type are stretched to match the container’s width and height. In the case where the image’s width or height is smaller than the available viewport, the image will stretch to match the container, potentially leading to unwanted problems and worsened image quality. | ||
The `CloudinaryAssetFluidLimitPresentationSize` fragment can be used to to `gatsby-image` not to stretch an image larger than its maximum dimensions regardless of the size of its container: | ||
```graphql | ||
query { | ||
file(name: { eq: "avatar" }) { | ||
childCloudinaryAsset { | ||
fluid { | ||
...CloudinaryAssetFluid | ||
...CloudinaryAssetFluidLimitPresentationSize | ||
} | ||
} | ||
} | ||
} | ||
``` | ||
## Manual Usage | ||
@@ -192,0 +211,0 @@ |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
58675
318
0