Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted July 25, 20231 yr Hi, The thumbImage template has two small issues IMHO that should be addressed. {{if $image}} {{$image = ( $image instanceof \IPS\File ) ? (string) $image->url : $image;}} {{if $url}}<a {{if $dataParam}}{$dataParam} {{endif}}href='{$url}' title='{lang="$lang" sprintf="$name"}'{{else}}<span{{endif}} {{if !$lazyLoad || !settings.lazy_load_enabled}}style='background-image: url( "{file="$image" extension="$extension"}" )'{{else}}data-background-src='{file="$image" extension="$extension"}'{{endif}} class='{$classes} ipsThumb ipsThumb_{$size} ipsThumb_bg'> <img {{if $lazyLoad && settings.lazy_load_enabled}}src='{expression="\IPS\Text\Parser::blankImage()"}' data-{{endif}}src='{file="$image" extension="$extension"}' alt=''> {{if $url}}</a>{{else}}</span>{{endif}} {{else}} {{if $url}}<a {{if $dataParam}}{$dataParam} {{endif}}href='{$url}' title='{lang="$lang" sprintf="$name"}'{{else}}<span{{endif}} class='{$classes} ipsNoThumb ipsThumb ipsThumb_{$size}'>{{if $url}}</a>{{else}}</span>{{endif}} {{endif}} 1. The lazy loading scheme used is outdated, as it could simply use the loading="lazy" parameter, as it has been updated in other templates. 2. The alt='' should be replaced with alt='{lang="$lang" sprintf="$name"}' Cheers!
July 26, 20231 yr Community Expert Thank you for bringing this issue to our attention! I can confirm this should be further reviewed and I have logged an internal bug report for our development team to investigate and address as necessary, in a future maintenance release.
July 26, 20231 yr On 7/25/2023 at 8:56 PM, Gabriel Torres said: settings.lazy_load_enabled}}src='{expression="\IPS\Text\Parser::blankImage() Agree. This is an obsolete method and should not be used anymore.
July 26, 20231 yr Community Expert Yes and no, loading="lazy" cannot work for background-images for example, which is something we use it for currently. We won't be making any changes for this in v4.
January 24, 20241 yr Community Expert Solution This issue has been resolved in the recently released 4.7.15 version. Please update your site if you are still experiencing the issue, and let us know if you see any reoccurrence.