Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Issues
  • #618
Closed
Open
Issue created Sep 10, 2016 by Administrator@rootContributor

Meta tag with image url content

Created by: roadmanfong

I 'd like to add something like

    <meta property="og:image" content="./src/images/cover.png" />
    <meta name="twitter:image" content="./src/images/cover.png" />

I notice that it didn't handle image inside the meta tag. And I found a solution here https://github.com/webpack/html-loader/issues/17#issuecomment-241038572

    <meta property="og:image" content="${require(`./src/images/cover.png`)}" />
    <meta name="twitter:image" content="${require(`./src/images/cover.png`)}" />

All we have to do is minor change in html loader setting loader: 'html?interpolate=require',

https://github.com/roadmanfong/create-react-app/commit/48bb6cf692ae401f8deba02cb53009be0f7a9b3e

Assignee
Assign to
Time tracking