Meta tag with image url content
See original GitHub issueI '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
Issue Analytics
- State:
- Created 7 years ago
- Comments:35 (16 by maintainers)
Top Results From Across the Web
The Essential Meta Tags for Social Media - CSS-Tricks
Facebook uses <meta> tags leveraging the Open Graph protocol, ... A URL to a unique image representing the content of the page.
Read more >HTML meta tags cheatsheet - Devhints
The one-page guide to HTML meta tags: usage, examples, links, snippets, and more.
Read more >Fixing the Preview Image, Title and Description for Shared Links
To modify a page's preview image, description, and additional metadata for these services, you can provide meta tags in the HTML code of...
Read more >HowTo: Use images in Metatag - Drupal
The following outlines how to use an image field on a content type for populating image meta tag information.
Read more >html - Meta tags for URL with description and image (In Skype ...
Is there someone who knows which tags are used to provide these images and descriptions on Skype and Discord? I tried adding some...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
Top Related Hashnode Post
No results found
Top GitHub Comments
I can’t really imagine why somebody would want to start their attributes with
./
and not mean a local file, so I think it will be safe to just assume that’s the intention.thanks @gaearon i’ll look into it 😃