Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ feat(saveImageFromUrl): Dynamic Extension Handling (danny-avila#1514)
- Enhanced the `saveImageFromUrl` function to dynamically handle file extensions based on the content type of the fetched image. - Replaced the method of appending a '.png' extension with a more robust approach using regular expressions and the path module. - Allows for correct extension replacement or addition, ensuring filename consistency and compatibility with the actual image format. - Prevents issues with double extensions (e.g., 'someimage.jpg.png') and aligns saved file types with their respective content types.
- Loading branch information