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)

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
376 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
4k 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
6k 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
3k 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
2k 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. ...
5
votes
1answer
4k views

remove links from images using functions.php

I am looking for a way to remove the attachment link from images in the post content. I would like to add this to the functions.php in my theme. I know you can disable this in the post on a per ...
2
votes
1answer
171 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
2k 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
1k 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 ...
4
votes
1answer
579 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
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
431 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
2answers
3k 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.
1
vote
3answers
548 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
169 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
323 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
437 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
504 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
409 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
769 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
924 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
435 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
2answers
356 views

Resizing Images to lower Disk Space Using Plugins

I'm trying to take existing images and shrink the file size down by resizing to photos to a smaller resolution. I've tried a few methods so far: Simply editing the photo in photoshop and reuploaded, ...
2
votes
3answers
626 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
2answers
533 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
194 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
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
758 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
146 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
3k 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
794 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
621 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
105 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
2answers
7k 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 ...
3
votes
2answers
1k views

How to get Images included in Post

is possible to get images added to a post programmatically? I am working on custom template (my first) and I need to display Images added to a post in specific way.(first image as title image and the ...
2
votes
1answer
471 views

Resizing only featured images while uploading

I was taking a backup of my wp-content folder. But when I noticed size of uploads folder. I was astonished and each image used in my blog had 5 copies with different sizes in that folder. All these ...
2
votes
1answer
405 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) { ...
2
votes
2answers
509 views

How to disable “insert into post” only when selecting the Featured Image?

I wish to restrict the user from putting inline images in the article. I am using the Wordpress Attachments plugin to allow the user to attach images, which I then position and stylize the way I want. ...
2
votes
2answers
670 views

Display info from custom fields in all images' HTML

Okay, I've been working on this all day and can't find the solution anywhere. I've created a custom field within the image upload screen (info first found here). The field stores the name of a ...
1
vote
2answers
33 views

How to add a rel attribute to images that contains their categories?

I've added categories to images, so that I can use them to filter images within a portfolio page. Now I'm thinking I need to add the rel attribute to each image that contains its assigned categories. ...
1
vote
1answer
118 views

Prevent large image uploads

I want to prevent users in my blog from uploading large size images. And I mean large in px size not MB. Max Upload is set to 8MB which should be ok but I wan't to prevent uploading for images larger ...
1
vote
2answers
2k views

get_post_gallery_images returns thumbs . I want full size

I have the following code on my site. <?php // image gallery content if( has_shortcode( $post->post_content, 'gallery' ) ) { $gallery = get_post_gallery_images( ...
1
vote
1answer
54 views

Change Width of Featured Image Thumbnail on Add/Edit Post Page

Does anyone know of a way to change the width of the featured image on the edit post/add post page? I want to make it 50px wide. I'm not talking about the front page of the website, but the back end ...