Adding Images to Your Hugo Portfolio
Images make your portfolio and blog posts much more engaging and professional. Here’s how you can add them to both your blog posts and portfolio projects.
Blog Post Images
Method 1: Featured Image in Frontmatter
Add an image field to your blog post’s frontmatter:
| |
Method 2: Images in Content
You can also add images directly in your markdown content:
| |
Portfolio Project Images
For portfolio projects, add the image field in your data/portfolio.yml:
| |
Best Practices
- Image Optimization: Use optimized images (WebP, proper sizing)
- Alt Text: Always include descriptive alt text
- Consistent Naming: Use clear, consistent file naming
- Responsive Images: Hugo handles responsive images automatically
File Organization
Store your images in:
/static/images/blog/- for blog post images/static/images/portfolio/- for portfolio project images
The static folder content is served directly by Hugo.