diff --git a/generate_thumbnails.py b/generate_thumbnails.py index d7b0187..f6241a1 100644 --- a/generate_thumbnails.py +++ b/generate_thumbnails.py @@ -15,6 +15,7 @@ def generator_finalized(generator): """ output_path = generator.settings['OUTPUT_PATH'] content_path = generator.settings['PATH'] + media_path = os.path.join(content_path, 'media') thumb_dir = os.path.join(output_path, 'media', 'thumbnails') if not os.path.exists(thumb_dir): @@ -33,7 +34,7 @@ def generator_finalized(generator): # and STATIC_PATHS includes 'media'. # We assume article.image is a path relative to the 'content' folder. - source_image_full_path = os.path.join(content_path, image_path_rel_to_content) + source_image_full_path = os.path.join(media_path, image_path_rel_to_content) if not os.path.exists(source_image_full_path): log.warning(f"Source image not found for article '{article.slug}': {source_image_full_path}")