Add filename as alt text to images

This commit is contained in:
discomrade 2022-02-25 12:23:54 -01:00 committed by -
parent 745f1cbb23
commit 71d9463e47
2 changed files with 3 additions and 3 deletions

View File

@ -1216,7 +1216,7 @@
// Youtube.js embed HTML code // Youtube.js embed HTML code
$config['youtube_js_html'] = '<div class="video-container" data-video="$2">'. $config['youtube_js_html'] = '<div class="video-container" data-video="$2">'.
'<a href="https://youtu.be/$2" target="_blank" class="file">'. '<a href="https://youtu.be/$2" target="_blank" class="file">'.
'<img style="width:360px;height:270px;" src="//img.youtube.com/vi/$2/0.jpg" class="post-image"/>'. '<img style="width:360px;height:270px;" src="//img.youtube.com/vi/$2/0.jpg" class="post-image" alt="YouTube thumbnail: $2"/>'.
'</a></div>'; '</a></div>';
// To embed YouTube thumbnails locally and avoid users connecting to YouTube servers when loading threads, // To embed YouTube thumbnails locally and avoid users connecting to YouTube servers when loading threads,
@ -1225,7 +1225,7 @@
$config['youtube_js_html'] $config['youtube_js_html']
= '<div class="video-container" data-video="$2">' = '<div class="video-container" data-video="$2">'
. '<a href="https://youtu.be/$2" target="_blank" class="file">' . '<a href="https://youtu.be/$2" target="_blank" class="file">'
. '<img style="width:255px;height:190px;" src="/vi/$2/0.jpg" class="post-image"/>' . '<img style="width:255px;height:190px;" src="/vi/$2/0.jpg" class="post-image" alt="YouTube thumbnail: $2"/>'
. '</a></div>'; . '</a></div>';
$config['embedding'] = array(); $config['embedding'] = array();

View File

@ -39,7 +39,7 @@
{% if shadow %}{{ config.uri_shadow_thumb }}{% else %}{{ config.uri_thumb }}{% endif %}{{ post.thumb }} {% if shadow %}{{ config.uri_shadow_thumb }}{% else %}{{ config.uri_thumb }}{% endif %}{{ post.thumb }}
{% endif %} {% endif %}
" "
style="width:{{ post.thumbwidth }}px;height:{{ post.thumbheight }}px" alt="" style="width:{{ post.thumbwidth }}px;height:{{ post.thumbheight }}px" alt="{{ post.filename|e|bidi_cleanup }}"
/> />
{% endif %} {% endif %}
</a> </a>