@kgmservizi I’ve test the new update version I think instead of using url_image=attachment[i].url for no thumbnail files I think you can use the default file image of wordpress here is the code
if (attachment[i].sizes) {
if (attachment[i].sizes.thumbnail !== undefined ) url_image=attachment[i].sizes.thumbnail.url;
else if (attachment[i].sizes.medium !== undefined ) url_image=attachment[i].sizes.medium.url;
else if (attachment[i].sizes.full !== undefined ) url_image=attachment[i].sizes.full.url;
} else {
url_image = attachment[i].icon;
}
-
This reply was modified 2 years, 11 months ago by merckdelmoro.
-
This reply was modified 2 years, 11 months ago by merckdelmoro.
-
This reply was modified 2 years, 11 months ago by merckdelmoro.
-
This reply was modified 2 years, 11 months ago by merckdelmoro.