Develop a web-based image size compressor tool using Next.js. The tool should allow users to upload images and specify a target file size for compression. The application should provide a user interface for uploading images, displaying the original image size, and setting the desired compressed file size. Implement the compression logic to reduce the image file size while maintaining acceptable image quality. The tool should then display the compressed image and its new file size, and provide an option for the user to download the compressed image. Ensure the application handles various image formats and provides feedback to the user during the compression process, including any potential errors or limitations.
Loading...
Loading...