Change img options to all be before src is specified.

This commit is contained in:
2025-12-01 08:49:41 -07:00
parent cae8acda27
commit c601559059

View File

@@ -153,7 +153,7 @@ function build_album_pages {
elif [[ $photo == *".md" || $photo == *".txt" ]]; then elif [[ $photo == *".md" || $photo == *".txt" ]]; then
echo -e "\t\t\t\t\t<p>`cat $photo`</p>" >> $subpage echo -e "\t\t\t\t\t<p>`cat $photo`</p>" >> $subpage
else else
echo -e "\t\t\t\t\t<img src='/$photo' loading='lazy' alt=''>" >> $subpage echo -e "\t\t\t\t\t<img loading='lazy' alt='' src='/$photo'>" >> $subpage
fi fi
# Check if it needs an extra descriptive detail. # Check if it needs an extra descriptive detail.
echo -en "\t\t\t\t\t<p>$filename" >> $subpage echo -en "\t\t\t\t\t<p>$filename" >> $subpage
@@ -229,7 +229,7 @@ function build_all_page {
dir_name="${dir_name//_/ }" dir_name="${dir_name//_/ }"
dir_name="${dir_name//-/ }" dir_name="${dir_name//-/ }"
media="<img src='$media_uri' alt='' loading='lazy' style='width:100%'>" media="<img style='width:100%' loading='lazy' alt='' src='$media_uri'>"
# Determine how to show the file. # Determine how to show the file.
if [[ $media_uri == *".mp4" ]]; then if [[ $media_uri == *".mp4" ]]; then