mirror of
https://github.com/joomla/joomla-cms.git
synced 2024-06-25 23:02:55 +00:00
Do not set a width of 0 in media thumbnails (#38535)
This commit is contained in:
parent
7f72d6c1da
commit
1c4fcf60b6
|
@ -16,7 +16,7 @@
|
|||
class="image-cropped"
|
||||
:src="getURL"
|
||||
:alt="altTag"
|
||||
loading="lazy"
|
||||
:loading="loading"
|
||||
:width="width"
|
||||
:height="height"
|
||||
>
|
||||
|
@ -76,10 +76,13 @@ export default {
|
|||
: `${this.item.thumb_path}`;
|
||||
},
|
||||
width() {
|
||||
return this.item.width;
|
||||
return this.item.width > 0 ? this.item.width : null;
|
||||
},
|
||||
height() {
|
||||
return this.item.height;
|
||||
return this.item.height > 0 ? this.item.height : null;
|
||||
},
|
||||
loading() {
|
||||
return this.item.width > 0 ? 'lazy' : null;
|
||||
},
|
||||
altTag() {
|
||||
return this.item.name;
|
||||
|
|
Loading…
Reference in New Issue
Block a user