How to resize a PNG image?

I have some PNG images available from a backup I had taken in the past. They are a mix of logos, banners, screenshots, blog images etc. I want to resize these PNG images to different sizes based on where they go; for example, logos must be 200x67, and Banners must be 400x300. What is the best way to resize these images to the required size without going through all of them one by one?

Real-time URL-based resizing

When using ImageKit, you can use real-time resizing parameters for all images, whether these images are uploaded in the ImageKit Media Library or present on your server or cloud storage like S3, Azure, etc., that is connected to ImageKit.

You need to add the height or width transformation parameters in the URL and you will get your PNG image resized in real time.

For example, to resize a PNG image to width 220px, we add ?tr=w-220 to the URL

https://ik.imagekit.io/ikmedia/docs_images/product_image_1.png?tr=w-220

You have other resize and crop options as well. You can specify either height or width, or combine one of these parameters with the aspect ratio parameter to resize the PNG image in real-time. For example, with the aspect ratio parameter set to 1:1 at width 520px, our transformation will look like this

https://ik.imagekit.io/ikmedia/docs_images/product_image_1.png?tr=w-520,ar-1-1

You can directly use this URL on your website or app for your end users. ImageKit uses a CDN for fast loading time, and we will also convert it to a suitable format that is supported on the user’s device. Like if a device supports WebP, ImageKit will a PNG to WebP automatically for smaller size.

Manual Resize

You can also resize the PNG image manually if needed using the browser-based image editor in ImageKit. For this, upload the PNG image to the ImageKit Media Library, which is a built-in DAM solution, and use the image editor to resize the image. You can download the image or save it back to the media library.