How to use the gatsby-plugin-sharp.fluid function in gatsby-plugin-sharp

To help you get started, we’ve selected a few gatsby-plugin-sharp examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github palmerhq / changecast / plugins / gatsby-remark-images / index.js View on Github external
imageClass = _require.imageClass,
    imageBackgroundClass = _require.imageBackgroundClass,
    imageWrapperClass = _require.imageWrapperClass;

var visitWithParents = require("unist-util-visit-parents");

var getDefinitions = require("mdast-util-definitions");

var path = require("path");

var isRelativeUrl = require("is-relative-url");

var _ = require("lodash");

var _require2 = require("gatsby-plugin-sharp"),
    fluid = _require2.fluid;

var Promise = require("bluebird");

var cheerio = require("cheerio");

var slash = require("slash");

var _require3 = require("gatsby-source-filesystem"),
    createRemoteFileNode = _require3.createRemoteFileNode; // If the image is relative (not hosted elsewhere)
// 1. Find the image file
// 2. Find the image's size
// 3. Filter out any responsive image fluid sizes that are greater than the image's width
// 4. Create the responsive images.
// 5. Set the html w/ aspect ratio helper.


Wrapper of the Sharp image manipulation library for Gatsby plugins

Latest version published 4 months ago

Package Health Score

94 / 100
Full package analysis

Popular gatsby-plugin-sharp functions