0

I am working on a project where users can save URLs. When the user saves the URL I want to show the title and image for the webpage. How can I get the title and image?

Also, I want to achieve these in frontend with JS. I am not sure if it is possible but I don't want to store these information in my database.

Example: Example

osman tamer
  • 61
  • 1
  • 9
  • 2
    Does this answer your question? [How can I retrieve og/meta attributes of a resource?](https://stackoverflow.com/questions/19312942/how-can-i-retrieve-og-meta-attributes-of-a-resource) – esqew Aug 04 '21 at 20:51
  • its depends how website of the image provide that information. i mean on google images or facebook or twitter you will get different procedure to get the information. but if the image is on your database you can find out how javascript read meta information of an image. – Hanna Rose Aug 04 '21 at 21:12
  • thanks for your help. @esqew can you help a bit more. I am trying to achieve this but I get cors header block error. I am still not sure if I can achieve this in front end but answers suggest that we can. Thanks in advance! – osman tamer Aug 04 '21 at 21:22

0 Answers0