# Caption for image

What is the easiest way to display captions right under the images? I already put the following in the blueprint, but the text in the caption field is not displayed

``````files:
fields:
caption:
label: Caption
type: textarea
``````

Thanks!

I know how I can do this manually, but I thought there was an automatic way to do this to every image just by adding the caption field to the blueprint.

The tags.php looks like it should also return the caption for each image, or am I totally wrong here?

``````if(!empty(\$caption)) {
\$figure->append('<figcaption>' . html(\$caption) . '</figcaption>');
}``````

If you add a caption field to your files in your blueprint, this generates a form for the file in the panel, where you can then add your caption. Of course, if you don’t add anything, nothing can be displayed. You might want to have a look at this post Adding metadata files for images within the panel.

Other than that, I don’t really understand what you mean by “automatically”…

``````(image: image.jpg caption: Some caption text)
When searching for how to add captions, I only found solutions that involved blueprints. Instead the solution I just found was much simpler: Just add `(image: lake.jpg caption: This is a lake)` within the text. This displays the image and below the caption with a `figcaption` tag