
Check out the Github Repository ♥
One of the biggest problems theme developers face is the problem of multiple image sizes. When you upload an image in the media library, WordPress automatically creates thumbnails based on all the image sizes you have defined using add_image_size() whether you want to use them or not. So the vast majority of the images in wp-content/uploads directory are a waste, and are never used. This is not the optimum way of creating image sizes.
With this plugin, you can create as many image sizes as you want without the guilt of unnecessary image sizes taking up your disk space!
This is because the images created using this plugin are dynamically created when the image is called for the first time, rather than when it is uploaded. You can also delete the cached images for each image individually, or all the cached images.
Here are some functions and example code to get you started!
fly_get_attachment_image_src( $attachment_id, $size, $crop )
Returns an array:
array( 'src' => string, 'width' => integer, 'height' => integer )
fly_get_attachment_image( $attachment_id, $size, $crop, $attr )
Returns a HTML IMG element string:
<img src="http://yoursite.com/wp-content/uploads/fly-images/10/your-image-500x500-c.jpg" width="500" height="500" alt="Alt text" />
In this method, you define as many image sizes as you want in your functions.php file.
if ( function_exists( 'fly_add_image_size' ) ) { fly_add_image_size( 'home_page_square', 500, 500, true ); fly_add_image_size( 'home_page_square_2x', 1000, 1000, true ); fly_add_image_size( 'cropped_top_left', 1000, 1000, array( 'left', 'top' ) ); } Now, lets get the post thumbnail using the image sizes we just defined:
<?php echo fly_get_attachment_image( get_post_thumbnail_id(), 'home_page_square' ); ?>
Here’s another way you can do this:
<?php $image = fly_get_attachment_image_src( get_post_thumbnail_id(), 'home_page_square' ); echo '<img src="' . $image['src'] . '" width="' . $image['width'] . '" height="' . $image['height'] . '" />'; ?>
Let’s get the image from our example above which has a crop position defined:
<?php echo fly_get_attachment_image( get_post_thumbnail_id(), 'cropped_top_left' ); ?>
Lets get the post thumbnail using some dynamic image sizes:
<?php echo fly_get_attachment_image( get_post_thumbnail_id(), array( 500, 500 ), true ); ?>
Here’s another way you can do this:
<?php $image = fly_get_attachment_image_src( get_post_thumbnail_id(), 'home_page_square', array( 500, 500 ), true ); echo '<img src="' . $image['src'] . '" width="' . $image['width'] . '" height="' . $image['height'] . '" />'; ?>
Lets get the post thumbnail cropped from the bottom right:
<?php echo fly_get_attachment_image( get_post_thumbnail_id(), array( 500, 500 ), array( 'right', 'bottom' ) ); ?>
Crop positions are set using an array. The first parameter of the array needs to be the x-axis crop and the second parameter needs to be the y-axis crop. This feature will not work the other way around.
For example:
✓ fly_get_attachment_image( get_post_thumbnail_id(), array( 500, 500 ), array( 'right', 'bottom' ) ) Will work! 🙂
✘ fly_get_attachment_image( get_post_thumbnail_id(), array( 500, 500 ), array( 'bottom', 'right' ) ) Will not work! 🙁
Check out the GitHub repository’s Wiki page for the full documentation: https://github.com/junaidbhura/fly-dynamic-image-resizer/wiki
Starting from $0 per month.
Rating
Reviewers
20 reviews
Tags
Developed By
Junaid Bhura
Quick & Easy
Common Ninja has a large selection of powerful Wordpress plugins that are easy to use, fully customizable, mobile-friendly and rich with features — so be sure to check them out!
Testimonial plugins for Wordpress
Contact Form plugins for Wordpress
Maps plugins for Wordpress
Translation plugins for Wordpress
Chat plugins for Wordpress
Slider plugins for Wordpress
Reviews plugins for Wordpress
Contact plugins for Wordpress
Galleries plugins for Wordpress
SEO plugins for Wordpress
Forms plugins for Wordpress
Comments plugins for Wordpress
Backup plugins for Wordpress
Privacy plugins for Wordpress
Optimize plugins for Wordpress
Tabs plugins for Wordpress
Social Sharing plugins for Wordpress
Events Calendar plugins for Wordpress
Comments plugins for Wordpress
Social Feeds plugins for Wordpress
Social Sharing plugins for Wordpress
Portfolio plugins for Wordpress
Video Player plugins for Wordpress
popup plugins for Wordpress
SiteMap plugins for Wordpress
Payment plugins for Wordpress
Coming Soon plugins for Wordpress
Inventory plugins for Wordpress
Testimonials plugins for Wordpress
Portfolio plugins for Wordpress
Membership plugins for Wordpress
Forms plugins for Wordpress
Analytics plugins for Wordpress
Events Calendar plugins for Wordpress
Sliders plugins for Wordpress
Analytics plugins for Wordpress
Reviews plugins for Wordpress
Security plugins for Wordpress
Ads plugins for Wordpress
Music Player plugins for Wordpress
Countdown plugins for Wordpress
Email Marketing plugins for Wordpress
Membership plugins for Wordpress
Ecommerce plugins for Wordpress
Customer Support plugins for Wordpress
Video Player plugins for Wordpress
Tabs plugins for Wordpress
Social Feeds plugins for Wordpress
Common Ninja Apps
Browse our extensive collection of compatible plugins, and easily embed them on any website, blog, online store, e-commerce platform, or site builder.
Showcase photos with an image stack gallery that layers images in a stacked display with smooth transitions to create a visually striking presentation.
Slide in panel that appears from the top or bottom to highlight offers, capture attention, and guide visitors toward more conversions.
Show Bluesky posts with a Bluesky feed that updates in real time, improves content discovery, and keeps visitors engaged with fresh activity.
Use a Cookie Banner to inform visitors about cookies on your site and let them manage their consent in a clear, structured way.
Create real estate listings with a listings widget that displays properties clearly, supports customization, and helps visitors explore homes more easily.
Show eBay reviews to build trust, strengthen credibility, and help visitors make confident purchase decisions that support higher sales.
Create headlines with background images that blend text and visuals and let you control animation, position, and fonts.
Showcase content with a card slider that presents images, text, and buttons in a smooth, customizable layout to keep visitors engaged.

Create consent forms that collect signatures, save submissions, send notifications, and help you manage approvals efficiently.
Add a translation widget to your site so users can switch languages easily and access content in their preferred language.
Add an FAQ section to your site to answer common questions, reduce support requests, and give visitors a smoother and more confident user experience.
Show Instagram posts in a responsive carousel layout to enhance social proof and keep your site content visually fresh.
More plugins
The Common Ninja Search Engine platform helps website builders find the best site widgets, apps, plugins, tools, add-ons, and extensions! Compatible with all major website building platforms - big or small - and updated regularly, our Search Engine tool provides you with the business tools your site needs!
