This commit is contained in:
parent
1ac2b7fad6
commit
417850a705
@ -174,7 +174,7 @@ def format_size(size):
|
||||
def get_images(path):
|
||||
images = []
|
||||
for image in pathlib.Path(path).iterdir():
|
||||
if image.is_file() and image.suffix in [
|
||||
if image.is_file() and image.suffix.lower() in [
|
||||
".png",
|
||||
".jpg",
|
||||
".gif",
|
||||
@ -200,7 +200,7 @@ def create_images_html(url, image_paths):
|
||||
images_html = ""
|
||||
for image_path in image_paths:
|
||||
path = url.rstrip("/") + "/" + image_path.name
|
||||
thumbnail_path = url.rstrip("/") + "/thumbnail/" + image_path.name
|
||||
thumbnail_path = "/thumbnail/" + url.strip("/") + "/" + image_path.name
|
||||
images_html += f'<a href="{path}"><img class="thumbnail" src="{thumbnail_path}" alt="{image_path.name}" /></a>\n'
|
||||
return images_html
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user