Aqua Resizer is a small little script to dynamically resize, crop and scale images uploaded through WordPress on the fly. It is native, meaning it uses WordPress built-in functions to automatically process the images. If you’re a theme author, you know how troubling it is to resize images on WordPress. There are a few methods & scripts out there that provides this functionality. Timthumb for example, is one of the most popular scripts that is used by theme authors but have some drawbacks that forces authors to look for alternatives. There are also the “native” way of doing it using the add_image_size() function which leaves tonnes of unused images on the server. Additionally, Victor Teixeira came up with the vt_resize script that was then quickly adopted by WooThemes – unfortunately, its usability is quite limited and in some cases too complicated to use. Aqua Resizer, while not claiming to be better than the above methods, provides easy, fast, secure, and in general efficient … [Read more...] about Resize WordPress Images On The Fly With Aqua Resizer
Image
Exclude Featured Image From WordPress Image Attachments Loop
About Image Attachments… One of the coolest things about WordPress is the ability to use “Image Attachment loops” to showcase all the images attached in a given post. For example on my latest premium Theme ( Minim Portfolio WordPress Theme ) the single portfolio pages come with several styles (slider, gallery, list, full images…) which use a custom loop that pulls in all the images attached to the post so you can easily manage a kick a*s gallery without having to use any shortcodes. This is the a sample loop I use for pulling the image attachments on a post using the get_posts function… //attachement loop $args = array( 'orderby' => 'menu_order', 'post_type' => 'attachment', 'post_parent' => get_the_ID(), 'post_mime_type' => 'image', 'post_status' => null, 'posts_per_page' => -1 ); $attachments = get_posts($args); Excluding Featured Image From Attachment Loop Showing all the image attachments for a post is great for usability, however, sometimes a user may … [Read more...] about Exclude Featured Image From WordPress Image Attachments Loop
How to Add a Featured Image from a URL in WordPress
Sometimes you need to dynamically add a featured image to a post or a custom post type from another server than the one your WordPress install is running. And you’re facing a common issue: how to do it? Of course in this case, you need to grab the featured image from the second server, download it to your own server, in the upload folder, and assign it to the correct post. In the first step we are going to create a new post dynamically, and then we’ll deal with the featured image. Step 1: Create a Post Dynamically To dynamically create a post, you need to use the wp_insert_post() function. You can place the code below in an “IF” statement, otherwise each time a page is loaded it will create a new post. Not that handy. // Register Post Data $post = array(); $post['post_status'] = 'publish'; $post['post_type'] = 'post'; // can be a CPT too $post['post_title'] = 'My New Post'; $post['post_content'] = 'My new post content'; $post['post_author'] = 1; // Create Post … [Read more...] about How to Add a Featured Image from a URL in WordPress
Using Mobile-Detect to Show Custom Featured Images
I have been working on a Photography theme recently and one of the things I’ve been implementing is a mobile “style”. Unlike the common responsive themes that will adjust to your browser size no matter the device, I’ve been setting it up so mobile css/js loads only on tablets and hand-held devices. Well, on the desktop/laptop versions I want to keep a certain design that requires some images to have a fixed height but any width, however, on the mobile version I want these same images to have an unlimited height but a fixed width. Solution? I recently found a pretty sweet script called “Mobile Detect” which I’ve been using to load my css/js only on mobile devices, so why not use the same script to show different image sizes for mobile devices? Below I’ll show you how you can use this awesome script along side the aqua resizer function for re-sizing images to create two different image sizes – one for regular computers and one for mobile devices. How To Do It? First thing you … [Read more...] about Using Mobile-Detect to Show Custom Featured Images
Full Screen Image Background WordPress Plugin
Last week one of my fellow friends (Pippin from PippinsPlugins.com) released an awesome WordPress plugin called “Simple Full Screen Background Image”, which as the name suggests is a plugin which allows you to easily set an image as a full-sized background for your site. What makes this plugin different then the default “background” panel in WordPress 3.0+ is that it scales your image automatically with the browser, so regardless of the browser size the image will always fill the screen, even as you re-size the browser live! How To Use The Simple Full Screen Background Image Plugin Step 1: Download the plugin Upload the folder to your /wp-content/plugins/ folder Activate the plugin via the “plugins” menu in your WordPress dashboard One activated go to Apperance –> Fullscreen BG Image Choose your image from your media gallery or upload a new one Select the size you wish to insert and click “insert into post” Now a preview of the image will show below Click save … [Read more...] about Full Screen Image Background WordPress Plugin