Images are used in different ways by WordPress.You can use a theme with images in layout, place images within your post/page content, display images next to visitor's name called avatars etc

learn more… | top users | synonyms (3)

1
vote
5answers
672 views

How to associate an image with a term taxononmy and publish it on frontpage?

I couldn't find the solution anywhere else, so I believe is a valid question for this website. I think my problem is divided in two parts. I created a custom taxonomy called "Type" and within it, I ...
1
vote
1answer
1k views

Media > Image Sizes aren't being applied to uploads

Under Media Settings I edited the Image Sizes to the following: Thumbnail size: 170x80 Medium size: 550x170 Large size: 550x320 ("Crop thumbnails to exact dimensions" is checked) Maximum embed size: ...
0
votes
1answer
33 views

I want to rel=nofollow wordpress images

I have a default theme. When i add media to wordpress site. By default it use simple "a href" tag I want to add attribute "rel=nofollow" to it. Can anybody please point me in right direction?.
0
votes
1answer
58 views

Why is wp_get_attachment_image_src returning wrong dimensions? [duplicate]

I am using wp_get_attachment_image_src to construct the srcset attribute of an img tag. In that attribute I want to output a comma separated list of image urls along with the image widths. Using the ...
0
votes
1answer
402 views

WordPress Image Scaling Quality

How can I make sure that WordPress doesn't lose too much quality on uploaded images that are scaled down? Here are some samples. You can clearly see that an image resized in Photoshop comes out with ...
0
votes
1answer
172 views

How to select featured images for 1500 posts?

I have over 1500 posts I imported from Tumblr. While the images were imported into the gallery, I need to make sure there's a featured image for each. How do I make the images (12 per post minus 30 ...
0
votes
3answers
3k views

Change Attachment Post URLs to File URLs

I have a client with a very image heavy blog. Every time they upload images in their posts they are using the Attachment Post URL for the link instead of the File URL. The problem with this is that ...
0
votes
1answer
392 views

Is it possible to modify default image name suffix?

So that, I tried this technique - Modify Default Image Name Suffix but it doesn't work as I need, I have all the images loaded, and I need to regenerate them. And what about the recovery of the ...
-2
votes
1answer
65 views

How can we see which posts don't have a featured image or it doesn't exist anymore?

Which plugin or code I need to make it show me a list with the posts that don't have featured image or is broken(the featured image doesn't exist anymore)?
11
votes
2answers
5k views

How does WP media uploader create the 3 different sized images, and how can I duplicate it

I have finally!! got this thing I've tried about 12 times to make and 12 different ways, but finally got it to work,... sort of. I made a custom metabox for uploading and attaching images to posts, ...
9
votes
1answer
5k views

Adding Category/Tag/Taxonomy Support to Images/Media

I've been trying to add category, tag, or custom taxonomy support to images (or all media, though I'm only concerned with Images). I've got it part-way figured out with: add_action('init', ...
6
votes
1answer
7k views

Removing Image and Caption Dimension Attributes

This question is an offshoot from the this discussion on removing dimension attributes from images. The solution code provided on that thread works very well except that it has the unfortunate side ...
4
votes
1answer
4k views

How can I determine if a post has an image attachment?

As far as I know, there's not a simple function that will return true if a post has an attachment. With that in mind, what's the best way to determine if a post has an attachment (or even better, has ...
3
votes
1answer
3k views

How to create thumbnails for PDF uploads?

I'm developing a website that needs to allow users, within Gravity Forms, to submit a PDF file and have a JPG thumbnail created of the first page of the PDF that is then displayed in the created post. ...
2
votes
1answer
206 views

Rename attachments during upload

Here's the function I use for WP to rename images during upload on the fly and set the image's filename to match the post slug. function wpsx_5505_modify_uploaded_file_names($arr) { // Get the ...
2
votes
2answers
3k views

How can I hide media library images from general users?

As an admin I really like the features and functionality of the WordPress 3.5 media manager. With a multi-user site however all users can see all images in the media library - whether uploaded by ...
1
vote
1answer
2k views

Create Image Uploader for Widget

I found this post// Use Media upload in custom widget on wordpress 3.5 I'm not experienced in any of this so I pretty much just copied the code he provided into my own functions.php file. I uploaded ...
8
votes
5answers
13k views

How do I get the avatar URL instead of an HTML IMG tag when using get_avatar?

I'm using a plugin called Simple Local Avatars which lets me upload author images which are stored on my server locally (no Gravatar). The plugin works fine and get_avatar returns the local avatar. ...
4
votes
1answer
634 views

Auto-modifying original [full size] images

Is there a way to make WordPress process Full size images, which by default it leaves unmodified?
3
votes
2answers
4k views

set_post_thumbnail_size vs add_image_size

What is the difference between set_post_thumbnail_size and add_image_size? Is set_post_thumbnail_size for all images, and add_image_size for sizing images individually? Thanks.
3
votes
1answer
2k views

Programatically creating image attachments from local URLs and setting featured image

I'm currently working on importing an MovableType blog into WordPress. The blog has several thousand posts, and each post has an image associated with it. The export file contains references to each ...
3
votes
2answers
1k views

Automating a Daily Picture Blog?

I was wondering if anyone could give me some suggestions on how best I could streamline the following; I have a WordPress blog (privately hosted) which I update daily (well, I normally schedule a ...
2
votes
1answer
433 views

The WordPress Gallery, Grabbing The Link and Images?

I have created a template for gallery named image.php which allows me to create a news website style image gallery that can be embedded in posts. But I need two more things to make this complete. ...
1
vote
3answers
683 views

Download an image from a webpage to the default uploads folder

I am writing a custom theme/site in which I need to download images programatically from certain webpages to the upload folder and then insert them as part of the post. So, I was able to find the ...
1
vote
1answer
181 views

Modifying the HTML Output of Inserted Images

I've used Wordpress for years. Whenever I would add an image to an article, I manually would write out all of the HTML for every image. I also used an image lightbox plugin called Highslide for people ...
1
vote
1answer
345 views

Add custom image sizes to media uploader

I want to add custom image sizes to the media uploader: In order to do this, I use the following code (comments are there for convenience): // this function adds the custom image sizes to the ...
0
votes
2answers
1k views

Get an image from url in front end submission form

I am building a user generated content sharing theme so how can i allow visitors to upload an image from a url i mean to say that they enter the url and the image gets automatically attached this is ...
9
votes
2answers
493 views

What is a good alternative to using $content_width for image optimization?

The $content_width GLOBAL in WordPress effects many themes and even some plugins by limiting the size of images and embeds in posts, it is a requirement for themes submitted to wordpress.org. It is ...
4
votes
2answers
543 views

Removing default image size list in Media Box

I trying to remove unused image size (Thumbnail, Medium, Large) in MediaBox Any function can i use in functions.php ? or some trick ? PS : I know i can use jQuery trick but any better function to ...
3
votes
1answer
456 views

Preview Image Path in Admin Section

So I have run into a little glitch. i have a custom path for uploads and it works. the files get saved to the right place, etc. The problem I have is the 'widget box' in the admin section. immediately ...
3
votes
2answers
3k views

How do you modify the HTML output of a Gallery item (using the gallery shortcode)?

Im a bit lost on this simple problem so i thought id come and ask the pros. Ive just been told by my client that on their sites gallery, the name and description are on the same line. so for example ...
3
votes
1answer
842 views

get_intermediate_image_sizes Get the Size Names but How Do I Get the Sizes?

I'm setting up a widget that allows to add an image to a sidebar / widget area. Basically I have a dropdown that allows the user to select one of the available sizes inside the theme's functions.php ...
3
votes
3answers
1k views

Reducing image size in RSS only

Is it possible to reduce the image size of WordPress rss feeds parse to feedburner? Meaning to say I still want to retain the large image size on the original post page but only display the ...
3
votes
2answers
1k views

How can I prevent uploading bmp image?

I need to prevent uploading bmp image for user. How can it be possible?
3
votes
1answer
442 views

Double thumbnails?

is it possible to use the thumbnail mechanic twice? I find the thumbnail API really useful for allowing users to place in there own graphics, so that I can control size and position easily. All they ...
2
votes
3answers
701 views

Filter to modify post_title after image upload?

When I upload images, Wordpress 3.4.2 sets the Title to the base of the filename, such as "DSCN1234" or "IMG_1234". I'd like the Title to be left blank. The code that sets the Title during the upload ...
2
votes
1answer
283 views

Is there a way to define a default caption to all uploaded images

As the title of this answer say, I want to define a default caption to all uploaded images in my WordPress... Is there a way to do something like this?
2
votes
2answers
539 views

Best way to programatically add “rel” attributes to page and post images

For single posts and pages, I would like to add certain rel attributes to all the images on the contained therein added with the "Add Image" functionality on the edit screen. The attribute would be ...
1
vote
1answer
192 views

Generate fixed image sizes for different pages, eliminate sizes during upload

I've built a few sites in Wordpress and in general I'm quite pleased with all the possibilities it has developed lately. There's one main thing that is utterly confusing for end users; the sizes they ...
1
vote
1answer
216 views

Alter image output in content

I'm trying to implement the JAIL javascript into my WordPress install. The javascript requires me to add a data-attribute and change the output html of images. I have been looking through the codex ...
1
vote
2answers
1k views

Can't Display Featured Image in RSS Feed

I'm currently working on a test website on my local server using WordPress version 3.4.2. I've tried various different solutions. Some have included installing various plugins, such as WP RSS Images ...
1
vote
3answers
4k views

How to remove link from an image in a post?

When image is being added in a post it is being wrapped with a <a href></a> I want to know which class controls this segment and where I can find a decent doc for this kind of problems ...
1
vote
1answer
795 views

Retrieving and Storing Images Linked from Other Domains on Local Server?

(Moderator's note: The original title was "Copy and Paste picture in post without linking to original") When I copy and paste a picture from another editor window it appears nicely but it links to ...
0
votes
0answers
252 views

Create thumbnail on PDF upload with Gravity Forms

I'm working with some great code that was provided recently to create an image thumbnail from a PDF upload, and I'm now trying to implement this in the functions file so that it can be applied to any ...
0
votes
2answers
4k views

Set first image (external) as featured image / thumbnail

I've read through a lot of code snippets now and it seems like wether I'm to stupid or there is no solution for this. I have a setup where some information for a product is loaded via amazon API if I ...
0
votes
1answer
910 views

Is there a way to serve different resolution images to different devices?

I am making a mobile site, and I want to serve higher resolution images to devices with high pixel density, and normal image to the rest, is there a Wordpress functionality or plugin to help me do ...
5
votes
3answers
658 views

Separate Media Library for each user

I'm creating a theme for a client and one of their requests is to allow users to upload images for their own use, but there may be an option to share the images. Here are some of the caveats: Each ...
3
votes
1answer
149 views

Excludes posts that don't have attachments in the_content()

I'm trying to write a loop that excludes posts that don't have attachments in their content areas. I've got 200 posts in a custom post type called "students". I need to do a query of all students ...
3
votes
1answer
473 views

Hide custom image sizes from media library

I want to hide a few custom image sizes from the media uploader: The following code (posted here) works only for the default image sizes: function remove_image_sizes($sizes) { ...
3
votes
2answers
8k views

Upload multiple images in a custom metabox

I am new to theme development. I am trying to create a custom metabox that has the ability to upload a image. I am doing this on a page not a post. I want to output the images (multiple) onto the page ...