Yuanji's Blog

Generating Cover Images for Hugo Blog Posts

📅 2021/10/13 ( 2021/10/21 Updated ) | 🏷️ , ,
Previously, if you shared a post on this site to a social networking site(Twitter, Facebook, etc) or chat software that crawls content for preview, it would usually show the title and introduction of the post, but it felt a bit bare and boring. If we can add a sharing picture, it should look more beautiful, but for me it is very tedious to find a picture that is not very relevant only for this purpose. So I thought about whether there is a way to automatically generate one? The answer is yes. I will explain the details later on, but you can take a look at the following picture first which was generated for this article you are reading on, and if you share this article to any social media website, the cover image below will appear.