Migrate to Netlify Today

Netlify announces the next evolution of Gatsby Cloud. Learn more

ContactSign Up
Community Plugin
View plugin on GitHub

gatsby-plugin-github-avatar

Build Status npm version npm total downloads

Install

yarn add @micalgenus/gatsby-plugin-github-avatar
or
npm install --save @micalgenus/gatsby-plugin-github-avatar

How to use

// gatsby-config.js

module.exports = {
  plugins: [
    {
      resolve: `@micalgenus/gatsby-plugin-github-avatar`,
      options: {
        username: `micalgenus`, // Github username
        default: 12954607, // Github userid for default image
      },
    },
  ],
};

Example usage

// example.jsx

import React from 'react';
import Avatar from '@micalgenus/gatsby-plugin-github-avatar';

export class ExampleComponent extends React.Component {
  render() {
    return <Avatar />;
  }
}
© 2023 Gatsby, Inc.