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

feat(gatsby-image): Placeholder Improvements #10944

Merged

Commits on Jan 16, 2019

  1. feat(gatsby-plugin-sharp): Configurable base64 width

    Allows for using larger(or smaller) than the default `20px` width, trading size for quality via more/less pixels.
    
    Adds the `base64Width` arg to the fixed & fluid nodes.
    polarathene committed Jan 16, 2019
    Configuration menu
    Copy the full SHA
    5865ef1 View commit details
    Browse the repository at this point in the history
  2. chore(gatsby-plugin-sharp): Remove magic numbers

    Provides added clarity for where these numbers are used.
    
    Especially for the value of `72` where it's not clear if the value was for image or display density. `defaultBase64Width` improves clarity and keeps it DRY across both usages.
    polarathene committed Jan 16, 2019
    Configuration menu
    Copy the full SHA
    241c2f6 View commit details
    Browse the repository at this point in the history
  3. fix(gatsby-image): Support placeholder image with backgroundColor

    Place the `backgroundColor` div before/behind the placeholder img.
    polarathene committed Jan 16, 2019
    Configuration menu
    Copy the full SHA
    34bc962 View commit details
    Browse the repository at this point in the history
  4. chore(gatsby-image): Share common transitionDelay variable

    They seem all intended to use the same duration of `0.25s`, `fluid` backgroundColor div actually used `0.35s` for some reason which seemed a possible typo, this corrects that and avoids it in future.
    polarathene committed Jan 16, 2019
    Configuration menu
    Copy the full SHA
    43c971f View commit details
    Browse the repository at this point in the history
  5. feat(gatsby-plugin-sharp): Allow base64 format to differ, allow WEBP

    For example, WEBP base64 placeholders with a `backgroundColor` as fallback while using JPG/PNG with WEBP for the `<picture>` element.
    
    Adds the `forceBase64Format` config option.
    Adds support for WEBP base64 images.
    polarathene committed Jan 16, 2019
    Configuration menu
    Copy the full SHA
    b06b9e0 View commit details
    Browse the repository at this point in the history
  6. chore(gatsby-image): Update test snapshot

    polarathene committed Jan 16, 2019
    Configuration menu
    Copy the full SHA
    c12ec40 View commit details
    Browse the repository at this point in the history
  7. feat(gatsby-plugin-sharp): Support base64Width as a config option

    Allows setting a project wide default, rather than having to request it per image.
    
    Updates `defaultBase64Width` to be a function as `pluginOptions` has not initialized when assigned.
    polarathene authored and polarathene committed Jan 16, 2019
    Configuration menu
    Copy the full SHA
    5a62ede View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    142f484 View commit details
    Browse the repository at this point in the history

Commits on Mar 4, 2019

  1. Change density_72PPI to defaultImagePPI

    Co-Authored-By: polarathene <polarathene@users.noreply.github.com>
    wardpeet and polarathene committed Mar 4, 2019
    Configuration menu
    Copy the full SHA
    ec0071b View commit details
    Browse the repository at this point in the history
  2. Change density_72PPI to defaultImagePPI 2

    Co-Authored-By: polarathene <polarathene@users.noreply.github.com>
    wardpeet and polarathene committed Mar 4, 2019
    Configuration menu
    Copy the full SHA
    7d961da View commit details
    Browse the repository at this point in the history

Commits on Mar 12, 2019

  1. Configuration menu
    Copy the full SHA
    66d64d3 View commit details
    Browse the repository at this point in the history