Articles of images

How to add a link in a image's caption?

I would like to add a link to the caption of a photo in one of my posts. I can type in the HTML for the link in the caption, but when I publish the post the link gets removed. How do you add a link to a caption? This would be really useful for […]

Alter media caption/description conflict in WordPress?

When uploading an image, WordPress reads the description meta data from the jpg via wp_read_image_metadata and inserts it into the post_content field when adding the attachment via media_handle_upload or media_handle_sideload But when adding a image to the editor in WordPress, it looks for the caption in the post_excerpt field via image_media_send_to_editor What I’d like is […]

Use Media Library to manage galleries like Nextgen (with folders, albums, collections, tags, categories, terms…)

I’d wish to use WP 3.x standard Media Librery rather than relying on 3rd party plugins like NextGen no matter how well they’re written. I just don’t like duplicating functionalities. Media Librery actually can handle well images, provides thumbnails, captions… But I think lacks of organizing images in collections, folders, categories, terms. Is there a […]

Image width tag is less than the image pixel width – why?

I have been reading this morning about images uploaded via the Media Library in WordPress and I thought I had understood most of it. But there’s something I’m confused about. My understanding is that there are a range of default image sizes – thumbnail, medium, large – which are generated when you upload an image. […]

Auto delete WordPress images/thumbnails (all sizes) and featured after X days/hours, or similar?

I am looking for solution to auto delete images of old posts in WordPress site. I want to hold images of current 50 posts, others should be deleted automatically. It can be function to delete on time interval, or function to hold only images of last 50 posts. Does anyone know function or some plugin […]

WordPress is Inserting images into Post as HTTP and not HTTPS

I’ve logged into my site in HTTPS and I’m editing on a specific post. I’ve dragged an image to the edit window and am now inserting an image. The thing is WordPress is inserting the image as HTTP instead of HTTPS. It shows the URL as HTTP clearly and uneditable. Is there a way to […]

Programmatically adding images to media library

I am trying to programmatically add multiple images to media library, I uploaded the images to wp-content/uploads, now I try to use wp_insert_attachement. Here’s the code, however it’s not working as expected, I think metadata is not properly generated, I can see the files in media library, but without a thumbnail, also if I edit […]

No srcset for hard-cropped thumbnails

I am using hard-crop on featured images like this : add_theme_support( ‘post-thumbnails’ ); set_post_thumbnail_size ( 635, 200, true ); I have no other plugin installed, not even Jetpack. No matter how large the image I upload wordpress won’t add srcset for my cropped featured images. EDIT: The problem seems to be with hard crop feature […]

Width 100%: Aspect ratio of image

If I add an image to a post, WordPress hardcodes width and height attributes to the img tag. I added max-width:100% to my CSS, but of course, if my browser window gets smaller, the resized image gets stretched in height. What can I do about it? Is there a way to: A: Solve it with […]

How can you upload an image from within a settings page?

Is there an easy way to include an upload box to your settings page? I am building an Open Graph options page and I like users to upload a standard image directly from that page.