From 6426771b9ba3e041f4f74ce69860f1cbe09d56d7 Mon Sep 17 00:00:00 2001 From: Mike Fraser Date: Sun, 30 Jul 2017 21:22:28 +0100 Subject: [PATCH] Added fix to show captions (if added) --- responsive-images.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/responsive-images.php b/responsive-images.php index a977e81..110c8b9 100644 --- a/responsive-images.php +++ b/responsive-images.php @@ -47,6 +47,11 @@ $title = $file->title(); } + if(empty($caption) and $file->caption() != '') { + $caption = $file->caption(); + } + + } if(empty($alt)) $alt = pathinfo($url, PATHINFO_FILENAME);