diff --git a/api/app/services/files.py b/api/app/services/files.py index 3dfdc51c..03de49f5 100644 --- a/api/app/services/files.py +++ b/api/app/services/files.py @@ -9,7 +9,6 @@ import aiofiles import aiofiles.os import sentry_sdk -from PIL import Image, ImageOps from database.pg.file_ops.file_crud import ( create_db_folder, get_file_by_id, @@ -17,6 +16,7 @@ update_file_hash, ) from database.pg.models import Files +from PIL import Image, ImageOps from sqlalchemy.ext.asyncio import AsyncEngine as SQLAlchemyAsyncEngine USER_FILES_BASE_DIR = "data/user_files" @@ -201,7 +201,8 @@ def _resize_image_sync(source_path: str, target_path: str, width: int, height: i if ext in [".jpg", ".jpeg"] and resized_img.mode in ("RGBA", "P"): resized_img = resized_img.convert("RGB") - resized_img.save(temp_path, optimize=True) + img_format = Image.registered_extensions().get(ext) + resized_img.save(temp_path, format=img_format, optimize=True) os.replace(temp_path, target_path) except Exception as e: diff --git a/docs/imgs/github-social-preview.png b/docs/imgs/github-social-preview.png new file mode 100644 index 00000000..3d54a6b9 Binary files /dev/null and b/docs/imgs/github-social-preview.png differ diff --git a/docs/imgs/key-features-input-nodes.png b/docs/imgs/key-features-input-nodes.png index 7c54842e..4a99bcf3 100644 Binary files a/docs/imgs/key-features-input-nodes.png and b/docs/imgs/key-features-input-nodes.png differ diff --git a/docs/imgs/main-canvas-view.png b/docs/imgs/main-canvas-view.png index aaf7fdea..c1d20f70 100644 Binary files a/docs/imgs/main-canvas-view.png and b/docs/imgs/main-canvas-view.png differ diff --git a/docs/imgs/main-chat-view.png b/docs/imgs/main-chat-view.png index cba51c23..85d80b24 100644 Binary files a/docs/imgs/main-chat-view.png and b/docs/imgs/main-chat-view.png differ diff --git a/docs/imgs/readme_header.png b/docs/imgs/readme_header.png index 29ecbb57..67ef70e2 100644 Binary files a/docs/imgs/readme_header.png and b/docs/imgs/readme_header.png differ