Articles of image editor

Set Link Target Checkbox chcked on Edit Image MOdal Window in Admin Post Edit Screen?

Inside of newer versions of WordPress in the Visual Editor when you add a photo, you can then click on it which reveals an Edit, Delete, and Resize buttons. Now if you click on the Edit button shown in the image above. It will insert a Modal window into the DOM which has more settings […]

Force image crop size in media editor

I’ve searched high and low for this but think the answer I seek is being buried by the more common questions. I am developing a theme for a client that has two specific image sizes (100×127 for thumbnail, 300×380 for medium). I have the media settings cropping like this when an image is uploaded, but […]

Multiple variables through wp_get_image_editor

I want to merge 2 images with imagick. I already know how to merge them with imagick, but I need to pass 2 variables through wp_get_image_editor to get this to work. I named the 2 variables $background and $logo. $background contains the background image path. $logo contains the logo image path. Does anyone know how […]

Image rotation fails to regenerate custom sized thumbnail

I’m using custom image dimensions in functions.php like this: add_image_size( ‘custom-size-thumbnail’, 120, 120, true ); I uploaded some pictures with wrong orientation, so I used “edit” options to rotate them… Problem is, that only original size pictures (full, large, medium, thumbnail) are regenerated (as a new file in the FTP directory – original picture.jpg, rotated […]

How to get current image's slug in WP_image_editor?

I’ve been writing some class and functions to modify the path of thumbnails. I extended the original WP_Image_Editor class to achieve custom structure. What i want: to store the thumbnails in different folders based on their slugs, in the upload directory. such as : http://example.com/uploads/medium/image.jpg What i have already done: class WP_Image_Editor_Custom extends WP_Image_Editor_GD { […]

WordPress Uploader Editor shows broken image

I have the latest wordpress version installed. When I upload an image in the control panel for a post, I then go to edit it (crop an image for the thumbnail the way I want or rotate or do any kind of editing) and instead it shows a broken image. The actual images are uploaded, […]

How to link to the image editor's Edit Image function?

How do I link to the image editor‘s Edit Image function from the front end? I know that I can open the lightbox with a simple link, such as <a href=”wp-admin/media-upload.php?post_id=719&amp;type=image” id=”content-add_image” class=”thickbox add_image” title=”Add an Image”>Upload photos</a> However unlike opening the image edit lightbox, Edit Image is an input… example: <input type=”button” id=”imgedit-open-btn-766″ onclick=”imageEdit.open( […]

WordPress Image Editor doesn't update thumbs specified with `add_image_size()`

The title somewhat explains the issue. I have a template using bones. I am not sure if this matters or not. Bones – An HTML5, Mobile-First starter theme for rapid WordPress development. In the functions.php file we add some additional thumbnail size options: add_image_size( ‘bones-thumb-400’, 400, 300, true ); add_image_size( ‘bones-thumb-300’, 300, 230, true ); […]

Why doesn't WP_Image_Editor save images using the Filesystem API?

I was in the process checking some of my existing plugins for any unsafe filesystem accesses, when I ran across WP_Image_Editor’s save function, which calls _save, which finally calls make_image (below). WP_Image_Editor was released in WP 3.5, while the Filesystem API has been around since WP 2.6, so I would presume that the reasoning is […]