New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gatsby-transformer-cloudinary

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gatsby-transformer-cloudinary - npm Package Compare versions

Comparing version 0.3.3 to 0.3.4

13

get-image-objects.js
const axios = require('axios');
// todo: for fluid images when original width and height is not set, use width and height of image as is and make full width
// todo: investigate graphQL query overrides for width and height and abstract control to user through gql query
// Define default width values for fluid, fixed and base64 images
const DEFAULT_BASE64_WIDTH = 30;

@@ -7,2 +10,3 @@ const DEFAULT_FIXED_WIDTH = 400;

// Create Cloudinary image URL with transformations.
const getImageURL = ({

@@ -34,2 +38,3 @@ public_id,

// Fetch and return Base64 image
const getBase64 = async url => {

@@ -42,2 +47,3 @@ const result = await axios.get(url, { responseType: 'arraybuffer' });

// retrieve aspect ratio if in transformation else create aspect ratio values
const getAspectRatio = (transformations, originalAspectRatio) => {

@@ -59,2 +65,3 @@ const arTransform = transformations.find(t => t.startsWith('ar_'));

// Create shared image data for both fixed and fluid. Returns src and Base64
const getSharedImageData = async ({

@@ -98,3 +105,3 @@ public_id,

base64Width = DEFAULT_BASE64_WIDTH,
base64Transformations = null,
base64Transformations = [],
transformations = [],

@@ -154,7 +161,7 @@ chained = [],

originalHeight,
breakpoints,
breakpoints = [200, 400, 600],
version = false,
maxWidth = DEFAULT_FLUID_MAX_WIDTH,
base64Width = DEFAULT_BASE64_WIDTH,
base64Transformations = null,
base64Transformations = [],
transformations = [],

@@ -161,0 +168,0 @@ chained = [],

{
"name": "gatsby-transformer-cloudinary",
"version": "0.3.3",
"version": "0.3.4",
"description": "Transform local files into Cloudinary-managed assets for Gatsby sites.",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc