Articles of images

Can't get text to wrap around image

I’m trying to get the text to wrap around my image on my about page here About But as you can see the text just sits at the bottom of the image, how can I make it wrap around the image and be up top at the start of the image to the right of […]

Can wp_get_image_editor convert to icon?

I have a very simple question regarding wp_get_image_editor (https://codex.wordpress.org/Class_Reference/WP_Image_Editor). I can crop, resize and save an image like this: $image = wp_get_image_editor( ‘example_1.jpg’ ); $image->resize( 32, 32, true ); $image->save( $path . ‘/test.png’ ); // Works with jpg/gif/png It works perfectly. I can convert a JPG file to GIF or PNG (and vice versa), but […]

Why does the Hard Crop option Scale?

I have a number of custom image sizes. I noticed earlier, when I was publishing a new post, that the post image was cropped AND scaled. It is exactly the right dimensions.. but it isn’t the portion of the image it should be. This is the code in functions.php, for this particular image size. add_image_size( […]

add_image_size not working

I am trying to resize an image using either the following code: add_image_size(‘poster-full’, 450, 9999, false); OR add_image_size(‘poster-full’, 450); I need it to be resized widthwise, and height should be proportional. When, I go and Run the Regenerate Thumbnails Plugin, i see that the image is resized correctly. For both the above cases. But, when […]

Search by Attachment ID

I’m building a stock photo page for my company where we upload all photos our staff created so that it can be used later. It shows the ID of the image by post->ID so that users can see it, note it and be useful later – just like any other stock photo website. However, when […]

How to apply image alt descriptions from media library?

Consider this hypothetical: I upload photo.jpg to my media library, but DO NOT provide an alt description there. I then use that photo across several different pages of my site. Ideally I would like a plugin to enable me to add the alt description to photo.jpg in my media library and have that applied to […]

Meta query for a custom taxonomy on attachment

I have a custom taxonomy “length” with 3 values [‘long’, ‘medium’, ‘short’] I have attached this taxonomy to attachments (using CPT UI) Upon viewing the taxonomy I can see that I have successfully added ‘long’ to an image as it shows “count = 1” However my query is returning no records. Array ( [post_type] => […]

Why do I have blury images in WordPress

It seems WordPress is doing an exceptionally bad job when it comes to re-sizing my images. In the media options I have set my image sizes to my liking. Most notably 857px wide for the medium thumbs, and set the quality to 100, as well as turned on sharpening. I have set the following in […]

How to get the title of the random images from media library?

I am displaying random images in my homepage. My problem is, I can’t get the title of the images to show in lightbox. Here are my codes. Codes that gets the images from the media library function get_images_from_media_library() { $args = array( ‘post_type’ => ‘attachment’, ‘post_mime_type’ =>’image’, ‘post_status’ => ‘inherit’, ‘posts_per_page’ => 6, ‘orderby’ => […]

Custom field as featured image caption

The problem is: My featured image caption is not being shown since it is (still) stored in a custom field (called (wpcf-bildunterschrift). I can easily access the customfield, but not the field that WordPress stores its meta data for images in and since the meta data for the image isn’t stored with the image I […]