gatsby-remark-images-medium-zoom
Advanced tools
Comparing version 1.5.0 to 1.6.0
@@ -22,3 +22,3 @@ import mediumZoom from 'medium-zoom' | ||
function onFCP(callback) { | ||
if (!window.performance) { | ||
if (!window.performance || !window.PerformanceObserver) { | ||
return | ||
@@ -25,0 +25,0 @@ } |
{ | ||
"name": "gatsby-remark-images-medium-zoom", | ||
"version": "1.5.0", | ||
"version": "1.6.0", | ||
"description": "medium-zoom plugin for gatsby", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -32,4 +32,8 @@ <div align="center"> | ||
👉 This plugin requires `gatsby-remark-images` and `gatsby-transformer-remark`. You have to set the `linkImagesToOriginal` option to false in gatsby-remark-images. | ||
👉 This plugin requires `gatsby-remark-images` and either `gatsby-transformer-remark` **or** `gatsby-plugin-mdx`. | ||
The `linkImagesToOriginal` option needs to be set to `false`. | ||
### Use with `gatsby-transformer-remark` | ||
```javascript | ||
@@ -46,7 +50,7 @@ // In your gatsby-config.js | ||
maxWidth: 590, | ||
linkImagesToOriginal: false // point! | ||
linkImagesToOriginal: false // Important! | ||
} | ||
}, | ||
{ | ||
resolve: `gatsby-remark-images-medium-zoom`, // point! | ||
resolve: `gatsby-remark-images-medium-zoom`, // Important! | ||
options: { | ||
@@ -59,5 +63,37 @@ //... | ||
} | ||
]; | ||
] | ||
``` | ||
### Use with `gatsby-plugin-mdx` | ||
```javascript | ||
// In your gatsby-config.js | ||
plugins: [ | ||
{ | ||
resolve: `gatsby-plugin-mdx`, | ||
options: { | ||
// a workaround to solve mdx-remark plugin compat issue | ||
// https://github.com/gatsbyjs/gatsby/issues/15486 | ||
plugins: [ | ||
`gatsby-remark-images`, | ||
`gatsby-remark-images-medium-zoom` // Important! | ||
], | ||
gatsbyRemarkPlugins: [ | ||
{ | ||
resolve: `gatsby-remark-images`, | ||
options: { | ||
maxWidth: 590, | ||
linkImagesToOriginal: false // Important! | ||
} | ||
}, | ||
{ | ||
resolve: `gatsby-remark-images-medium-zoom`, // Important! | ||
options: {} | ||
} | ||
] | ||
} | ||
} | ||
] | ||
``` | ||
## ⚙ Options | ||
@@ -64,0 +100,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
256903
132