Learn how to create thumbnails, resize, and convert images directly from your cPanel interface. Enhance your website's visuals effortlessly with these powerful image manipulation tools.
Images are powerful tools for grabbing attention and enhancing your website's visual appeal. But large image files can slow down loading times, frustrating your visitors.
That's where cPanel's image management tools come in!
This guide will unveil the secrets of resizing, converting, and creating thumbnails using cPanel's built-in features, ensuring your website looks sharp and performs flawlessly.
Why Optimize Images?
Imagine a visitor clicks on your website, eager to explore your content. A barrage of large images takes ages to load, leaving them tapping their foot impatiently. Not an ideal first impression! Here's how image optimization benefits you:
- Faster Loading Times: Smaller images load quicker, keeping visitors engaged and happy.
- Improved User Experience: A speedy website translates to a more enjoyable browsing experience.
- Enhanced SEO: Search engines favor websites that load quickly.
- Bandwidth Savings: Smaller files consume less bandwidth, reducing your hosting costs.
NOTICE: Before embarking on modifying an image in the Images interface, you must first upload it through one of cPanel’s file management interfaces:
- The File Manager interface (cPanel » Home » Files » File Manager).
- The Web Disk interface (cPanel » Home » Files » Web Disk).
- The FTP Accounts interface (cPanel » Home » Files » FTP Accounts).
- The Git™ Version Control interface (cPanel » Home » Files » Git™ Version Control).
Now that is out of the way, let's continue.
Creating Thumbnails with cPanel Thumbnailer
-
Log in to your cPanel account. This is your central hub for website management.
-
Navigate to the "Files" section. Locate the menu or icons related to file management.
-
Click on "Images." Here's where the image magic happens!
-
Locate the folder containing your images. Use the directory structure to find the specific folder.
-
Click on "Thumbnail" next to the desired folder. This initiates the thumbnailing process.
-
Set the Scaling Percentage: Define the desired thumbnail size as a percentage of the original image size.
-
Keep Aspect Ratio Checked? Select this checkbox to maintain the original image's proportions, preventing a distorted final product.
-
Click "Thumbnail Images." Let cPanel work its magic and create your thumbnails!
Once done, click the thumbnail path to open the directory in cPanel’s File Manager interface (cPanel » Home » Files » File Manager).
Bonus Tip: Thumbnails are typically stored in a subdirectory named "thumbnails" within the original image folder.
Resizing Images with cPanel Scaler
-
Follow steps 1-3 from the "Creating Thumbnails with the Thumbnailer" section above.
-
Locate the specific image you want to resize.
-
Click on "Scale" next to the image filename. This opens the scaling interface.
-
Define the New Dimensions (Optional): Enter the desired width and height in pixels for the resized image.
-
Resize by Percentage (Optional): Alternatively, specify a percentage by which you want to enlarge or shrink the image.
-
Keep Aspect Ratio Checked (Optional): Maintain the original image's proportions to avoid stretching or squishing.
-
Retain Original Image (Optional): Select this checkbox to create a copy of the original image before resizing.
-
Click "Scale Image." cPanel resizes your image according to your specifications.
Converting Images with cPanel Image Converter
-
Follow steps 1-3 from the "Creating Thumbnails with the Thumbnailer" section.
-
Select the folder containing the images you want to convert. You can also convert individual images.
-
Click on "Convert." This opens the conversion interface.
-
Choose the Target File Format: Select the new format you want to convert your images to (e.g., PNG, JPG, GIF).
-
Click "Convert." cPanel converts your images to the chosen format.
Using cPanel API
To convert an image to a new file format using cPane API:
uapi --output=jsonpretty ImageManager convert_file image_file='images/myimage.jpg' type='png'
To create thumbnails from images. This will save the new thumbnail images in a thumbnail subdirectory inside the original directory. The system prepends thumbnail filenames with tn_ (for example, tn_picture.jpg).
uapi --output=jsonpretty ImageManager create_thumbnails dir='images' width_percentage='25' height_percentage='25'
To resize an image, first check the dimensions of the image file that you specify:
uapi --output=jsonpretty ImageManager get_dimensions image_file='image/myimage.jpg'
With this information, proceed to resize the image:
uapi --output=jsonpretty ImageManager resize_image image_file='images/image.jpg' width='200' height='300'
WebHostingM Support
Remember: If you're a WebHostingM customer and have questions regarding this tutorial, submit a ticket and our friendly engineers will be happy to assist you.
Not a WebHostingM customer yet, but curious about the power of cPanel? WebHostingM offers fantastic cPanel hosting plans – check them out at our cPanel Marketplace and unlock a world of website management possibilities!