UNPKG

gatsby-plugin-image

Version:

Adding responsive images to your site while maintaining high performance scores can be difficult to do manually. The Gatsby Image plugin handles the hard parts of producing images in multiple sizes and formats for you!

11 lines (10 loc) 473 B
/// <reference types="babel__template" /> import type { PluginObj, template as BabelTemplate, types as BabelTypes } from "@babel/core"; /** * This is a plugin that finds StaticImage components and injects the image props into the component. * These props contain the image URLs etc, and were created earlier in the build process */ export default function attrs({ types: t, template, }: { types: typeof BabelTypes; template: typeof BabelTemplate; }): PluginObj;