PictoPy icon indicating copy to clipboard operation
PictoPy copied to clipboard

Feat: Add support for additional image formats (WebP, BMP, TIFF, GIF)

Open Rudra-Tiwari-codes opened this issue 11 months ago • 2 comments

Describe the feature

Is there an existing issue for this?

  • [x] I have searched the existing issues

Feature Description

Currently, PictoPy only supports .jpg, .jpeg, and .png image formats. Modern photo libraries often contain images in other popular formats that should be supported.

Current Behavior

File: backend/app/utils/images.py - image_util_is_valid_image() function

allowed_extensions = {".jpg", ".jpeg", ".png"}

### Add ScreenShots

No screenshots.

### Record

- [x] I agree to follow this project's Code of Conduct
- [x] I want to work on this issue

### Checklist before Submitting.

- [x] Have you updated docs for it?.
- [x] Have you added unit tests?.
- [x] Have you made sure unit tests pass?
- [x] Have you made sure code formatting is correct?
- [x] Does it contain any style related issues?

Rudra-Tiwari-codes avatar Dec 26 '25 00:12 Rudra-Tiwari-codes

Hi maintainers šŸ‘‹, I’d like to work on this feature — Please assign this issue to me.

Proposed Solution

Extend allowed_extensions in image_util_is_valid_image() to include common formats such as .webp, .bmp, .tiff/.tif, and .gif.

Validate images by opening them with Pillow instead of relying only on file extensions.

Optionally reject animated GIFs if animation is out of scope.

Add unit tests for newly supported formats and invalid/corrupted images.

Update documentation to list supported image formats.

Thanks!

ML-dev-crypto avatar Feb 04 '26 18:02 ML-dev-crypto

Hi @rahulharpal1603 @rohan-pandeyy , checking if this is still available. I see @ML-dev-crypto proposed a similar approach in Feb - if that hasn't moved forward, I'd like to work on it. My approach: extend the allowed extensions in image_util_is_valid_image(), validate using Pillow rather than just the extension, and add tests for the new formats plus invalid/corrupted files. Let me know if I can go ahead.

JIturiDashami avatar Aug 28 '26 07:08 JIturiDashami