Add media ratio to improve page rendering

This commit is contained in:
2022-04-04 18:59:54 +02:00
parent 5ce7f0464d
commit 999ebc9a6d
7 changed files with 37 additions and 10 deletions

View File

@@ -998,7 +998,14 @@ function getMediaLink(asData, sType) {
'data-title': $Title.html(),
'data-orientation': asData.rotate
})
.append($('<img>', {'src': asData.thumb_path, title: oSpot.lang((asData.subtype == 'video')?'click_watch':'click_zoom')}))
.append($('<img>')
.attr({
'src': asData.thumb_path,
'width': asData.width, //set image ratio so that the required space can be reserved
'height': asData.height,
'title': oSpot.lang((asData.subtype == 'video')?'click_watch':'click_zoom')
})
)
.append($('<span>', {'class': 'drill-icon'}).addIcon('fa-drill-'+asData.subtype));
return $Link;