gatsby-source-cloudinary
Advanced tools
Comparing version
@@ -17,4 +17,4 @@ const {newCloudinary, getResourceOptions} = require('./utils'); | ||
const addTransformations = (resource, transformation)=>{ | ||
const splitURL = resource.url.split('/'); | ||
const addTransformations = (resource, transformation, secure)=>{ | ||
const splitURL = secure ? resource.secure_url.split('/') : resource.url.split('/'); | ||
splitURL.splice( 6, 0, transformation); | ||
@@ -45,3 +45,3 @@ | ||
resource.url = addTransformations(resource, transformations); | ||
resource.secure_url = addTransformations(resource, transformations); | ||
resource.secure_url = addTransformations(resource, transformations, true); | ||
@@ -48,0 +48,0 @@ const nodeData = getNodeData(gatsby, resource); |
{ | ||
"name": "gatsby-source-cloudinary", | ||
"version": "0.1.10", | ||
"version": "0.1.11", | ||
"description": "Gatsby source plugin to fetch files from Cloudinary into Gatsby.", | ||
@@ -5,0 +5,0 @@ "main": "gatsby-node.js", |
@@ -76,2 +76,4 @@ # Gatsby-Source-Cloudinary | ||
> The `f_auto` and `q_auto` Cloudinary transformations are applied automatically to all media queries. This optimizes the delivered media quality and format. | ||
Feel free to create feature requests.... and PRs :) |
6638
3.35%79
2.6%