not trying to display absent images

This commit is contained in:
Lionel Dricot 2023-09-04 10:29:14 +02:00
parent e14009f2a4
commit b1effe57b6
1 changed files with 3 additions and 0 deletions

View File

@ -84,6 +84,9 @@ if not _RENDER_IMAGE:
#return ANSItext that can be show by less
def inline_image(img_file,width):
#We dont even try displaying pictures that are not there
if not os.path.exists(img_file):
return ""
#Chafa is faster than timg inline. Let use that one by default
inline = None
ansi_img = ""