Skip to content
This repository has been archived by the owner on Mar 5, 2021. It is now read-only.

Adding wrapper styles #12

Open
robinmetral opened this issue May 27, 2019 · 0 comments
Open

Adding wrapper styles #12

robinmetral opened this issue May 27, 2019 · 0 comments

Comments

@robinmetral
Copy link

Hi Tyler,

I've realized that the wrapperStyle string I'm passing as an option doesn't seem to be applied.

{
  resolve: `gatsby-wordpress-inline-images`,
  options: {
    baseUrl: `mysite.com`,
    protocol: `https`,
    // sharp options
    maxWidth: 1280,
    wrapperStyle: `margin-top: 5rem;`, // <= this one
  },
},

wrapperStyle is passed to gatsby-plugin-sharp's fluid() (it's in options):

let fluidResult = await fluid({
file: imageNode,
args: {
...options,
maxWidth: formattedImgTag.width || options.maxWidth,
},
reporter,
cache,
})

However, sharp doesn't seem to take any wrapperStyle prop. I think that option is only in gatsby-remark-images. But I might be wrong!

Would it need to be implemented? Or id there something I'm doing wrong?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant