Fall back to URL for image alt text

If an attacment image has no description, use the URL for the
alt text instead. Having no description was causing image links
not to appear in Lynx.
This commit is contained in:
St John Karp 2018-10-07 17:58:57 -07:00
parent 457da06f22
commit 52a9cf68cd
1 changed files with 5 additions and 1 deletions

View File

@ -12,7 +12,11 @@
>
<img
src="{{ $attachment['preview_url'] }}"
alt="{{ $attachment['description'] }}"
alt="{{
$attachment['description'] === null
? $attachment['url']
: $attachment['description']
}}"
/>
</a>
</figure>