Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(gatsby-remark-images): Use pathPrefix also with WebP files #26472

Merged
merged 2 commits into from
Aug 24, 2020
Merged

fix(gatsby-remark-images): Use pathPrefix also with WebP files #26472

merged 2 commits into from
Aug 24, 2020

Conversation

frncesc
Copy link
Contributor

@frncesc frncesc commented Aug 15, 2020

Description

As described in #26471, pictures are not shown on Gatsby sites with pathPrefix when gatsby-remark-images has withWebp enabled.

This PR just adds the parameter { pathPrefix } to the args passed to fluid when building webpFluidResult, as is done when building fluidResult with the main options object (built in line 38)

Documentation

Despite not beign oficially documented as a valid param, gatsby-plugin-sharp, makes use of the pathPrefix param, as can be seen on fluid and other functions.

Related Issues

Fixes #26471

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Aug 15, 2020
@frncesc frncesc changed the title fix(gatsby-remark-images): Use pathPrefix also with WebP files #26471 fix(gatsby-remark-images): Use pathPrefix also with WebP files Aug 15, 2020
@wardpeet wardpeet added topic: remark/mdx Related to Markdown, remark & MDX ecosystem status: awaiting author response Additional information has been requested from the author and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Aug 18, 2020
Trailing comma in line 221 of packages/gatsby-remark-images/src/index.js
is causing a lint error (related to a prettier rule) in CircleCI
@frncesc
Copy link
Contributor Author

frncesc commented Aug 23, 2020

I added a commit deleting the comma at the end of the parameter list passed to _.defaults. It was causing a lint error related to a prettier rule.

@wardpeet wardpeet removed the status: awaiting author response Additional information has been requested from the author label Aug 24, 2020
Copy link
Contributor

@wardpeet wardpeet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Thank you for fixing! Code looks great! Let's ship it 🚢

@wardpeet wardpeet merged commit c8e8e32 into gatsbyjs:master Aug 24, 2020
Copy link

@M322W M322W left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

# -````

`@sciarretta

@wardpeet
Copy link
Contributor

Successfully published:

@frncesc frncesc deleted the webp-with-path-prefix branch August 24, 2020 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: remark/mdx Related to Markdown, remark & MDX ecosystem
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Images generated by 'gatsby-remark-images' with 'withWebp' option fail to show when 'pathPrefix' is set
3 participants