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)

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
3answers
871 views

Overide Gallery Default Link to Settings

Is there way to control the gallery default “Link to” setting? Using the image_default_link_type filter within a functions.php file works on inserting single images into posts but it doesn't seem to ...
2
votes
1answer
522 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
2answers
554 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
692 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
63 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
204 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
1answer
74 views

Applying class to links around self hosted images embedded to posts/pages

So I need to add a class to links around the images for lightbox purposes. But only to images from the upload directory, not to external ones. I've found this solution by @TommiForsström here: ...
1
vote
1answer
58 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 ...
1
vote
1answer
270 views

Extracting gallery images in Wordpress 3.5 on index.php

I'm trying to add a slider on my front blog page for every gallery post, but I have some trouble extracting the images from the post gallery, using the following code: $post_content = ...
1
vote
2answers
219 views

Allowing post attachments without allowing to insert in text

Is there a way I can allow the user to attach images as attachments to a post without allowing him to insert them within the text itself? Ideally the Upload Media button remains the same but the image ...
1
vote
0answers
77 views

Regex to turn embedded images in to attachments

I've got a blog that has all images embedded in each post rather than a thumbnail linking to an attachment page which is what I'd like. I understand from this question that no plugin (like Regenerate ...
1
vote
0answers
64 views

NextGEN Gallery- using shortcode for different galleries on different pages [duplicate]

Possible Duplicate: conditional shortcode not working I have a salon website with a gallery page wherein the user must first select a stylist prior to viewing their individual gallery. I ...
1
vote
1answer
167 views

Custom image size not selectable in uploader

I want to add a custom image size for each image, that is uploaded into posts (via the uploader). I found code-examples on several websites, but somehow they just don't work for me. This is (the ...
1
vote
1answer
460 views

Mass update excerpt

I'm using a photoblog theme which upon creating a new post it takes the post attachment and saves a modified "img src" string into the excerpt field. It then uses <?php the_excerpt(); ?> to ...
1
vote
1answer
939 views

Change website URL without breaking links or images? WP 3.3

I am using Wordpress 3.3.2. Currently I am working on a website in a dev folder on my domain, dev.domain.com. Upon creating pages and blog posts, it just occurred to me that when I move the WP ...
1
vote
1answer
8k views

Displaying a featured image (only img url) as the img src?

I have the following code: if (themedy_get_option('product_gallery')) { add_action('genesis_post_content', 'themedy_product_images', 1); } function themedy_product_images() { ?> <?php ...
1
vote
2answers
865 views

How to Create an Image Upload Box for Custom Posts?

Is it possible to have an image upload box in a Custom Post Type? I would like the user to be able to upload specific images just for the CPT.
1
vote
1answer
692 views

Loop through child images of a parent for a Nivo Slider

I want to use a Nivo slider to cycle through the children of a parent page one by one, how can I do that? I have the following piece of code that grabs ALL the children of a parent page and displays ...
1
vote
1answer
2k views

Count all images of a certain post type

I followed two posts related to my query. One was about the number of images attached to a post and second about showing all images of a certain post type. I tried to combine the two codes in the ...
1
vote
4answers
4k views

Using Taxonomy Image code with my get_categories code

I'm using Taxonomy Images to associate images with categories. I'm using the following code, one is to display the categories, the other to display the images. Here is the code that displays my ...
1
vote
2answers
967 views

Can I attach an image to a different post?

Image galleries display those images that were uploaded to that post, by default. If I wanted to move an image to a different post, so it appeared there instead, would I have to delete and re-upload? ...
1
vote
2answers
778 views

How to redirect 'file url' to 'post url' i.e. in attachment.php

I've just started using the attachment.php template on my site. What I'd like to do is redirect all images in posts that used 'file url' to 'post url' and my new attachment.php template. Is this ...
1
vote
1answer
2k views

How to add a random image to a post from gallery and only show one?

How to add a random image to a post from gallery and only show one? I know how to add an image and a gallery. I need to have one image from the galley show on the page at random each time the page is ...
1
vote
1answer
952 views

Why no images on a fresh Wordpress installation?

I've just installed Wordpress here at arun.sanspace.in But, don't know why, it doesn't display any images. I want to know why? I have another Wordpress installation on the same server which works ...
0
votes
1answer
274 views

Get the size (size in Kb or MB) of an featured image?

I need to display some featured image info on post page. Among other info I need to display file size of image (featured image of post). I tried this function inside single.php. <?php function ...
0
votes
0answers
16 views

Any easy way to automatically set the first inline image in a post as the thumbnail, for relative images?

I stumbled upon a problem in this post if you use a link like i.e. a relative URL, it won't work is there a neat trick around this problem? this solution should be URL independent. I.e. use a php ...
0
votes
1answer
38 views

Change image size depending on page

I've got a simple photographic site and it uses large image sizes throughout. On the archive page, however, I've got about 35 posts each showing the first image of each. By default, the images being ...
0
votes
1answer
676 views

Wordpress function: limit size, only jpg, jpeg, limit of uploaded files per account

Need help with a function that will limit upload for non admins: Check before upload if file is jpg, jpeg. Check before upload if picture is not bigger than 700kb. Limit uploaded files to 7 per ...
0
votes
1answer
393 views

Function to remove all classes on images inserted into posts?

I'd like my images to have no classes assigned to them by default, as I (sometimes) add my own classes to create custom 2 column layouts... can I do this without hacking the core? From my googling it ...
0
votes
0answers
58 views

Personalized images in widget MU site

I am using the module image-widget and is it possible to create personalized images for Multi user sites ? I want to make header, footer and right sidebar in image-widget. That is admin uploaded ...
0
votes
1answer
68 views

Exact image sizes

I am trying to define an image size of exactly 290 height x 180 width for all images uploaded to my WP site. I tried updating image sizes under Settings->Media->Image Sizes but these are only max ...
0
votes
1answer
573 views

Uploaded image not appearing in custom post type

I am writing a plugin which should allow users to create a custom post type called reseller and attach an image. The image is being uploaded to the uploads folder and appears in the media library with ...
0
votes
1answer
302 views

Random Featured Image Based on Category

I am looking to extend the below code to select a random featured image based on a specific category. The below works but uses an overall list of images to pull from vs a list of images based on ...
0
votes
1answer
48 views

Post-upgrade problems: Image URL in DB, but not showing

Hey I'm a WP noob but I was given the task of upgrading WP from 3.2.x to 3.5.x. Now some images aren't showing. Here's the chunk of code responsible for it: $query = "select w1.guid,w2.post_title, ...
0
votes
1answer
244 views

Has wp_get_attachment_image_src changed from 3.2.1 to 3.5.2?

I just upgraded my app from 3.2.1 to 3.5.2 and now I'm having an issue where my image srcs are blank in one of my pages. The databases are identical (since I just did a mysql dump/restore a few ...
0
votes
1answer
202 views

How to extract images of post and pages excluding header and logo image in wordpress?

I have tried this code to get all images from media library and i am sucessfully getting the source urls of all the images but now i want to exclude all the unwanted images like logo, header images ...
0
votes
1answer
615 views

Display different header images based on current page

I want to display, based on the current page another header image. Short example: Home -> Image A PageId 1,2,3,4 -> Image B (2,3,4 are childs of page 1) PageId 5, 6 -> Image C ... I tried to ...
0
votes
2answers
777 views

Remove rel=“attachment wp-att-XX”

When you add an image with "Add media" to the WYSIWYG editor the link around the image automatically gets a rel="attachment wp-att-XX". I would like to remove this with a script - Can anyone help me? ...
0
votes
2answers
517 views

How to get image name, mime type, width, height, file size from post custom field?

What I need is some function to echo file name of image used in post like "image-file-name.jpg", or just "image-file-name". Also it would be great to be able to have even more information about image ...
0
votes
3answers
1k views

custom image size with New Media Manager in wordpress 3.5

The last update broke my workflow, as the method of using custom image size inside the media manager has definitely changed. i'm trying to add my previously registered image sizes to the new ...
0
votes
1answer
1k views

How to Display an Image Uploaded through a Meta Box in a Template?

I am just learning to create a meta box to upload a file in wp-content/uploads folder through this code: //display image meta box function display_image_box() { global $post; wp_nonce_field( ...
0
votes
1answer
551 views

How to automatically populate a gallery with images attached to posts of one category?

I would like to have a gallery in a post or a page (code in template or via shortcode). The images of this gallery should be pulled automatically from posts of one or more categories of my choice. ...
0
votes
2answers
152 views

Re-process Images

I've got a blog that has the highest-resolution version of all its images embedded in the posts, rather than a thumbnail linking off to an image attachment page. Can you tell me how I can re-process ...
0
votes
1answer
338 views

Autogenerated Thumbnail compression depending on size

This is a follow up to this question, in witch the jpg compression is altered depending on what WP's built-in image resulting image size returns. While it may work for most of the people, i'm looking ...
0
votes
2answers
939 views

How wordpress handle upload images and how to use them in the code

When I upload images via the standard media uploader I notice that it upload the original images with the same name but creates other cropped copies of the original one and rename them with ...
0
votes
3answers
984 views

fitting the thumbnail image into a div

I want to get an uploaded image fitting 100% inside a div. The problem is that, the uploaded image has different size. For example, I uploaded an image and wordpress created an 150x150 thumbnail. I ...
0
votes
2answers
595 views

Featured Images on Front Page

I currently have a static front page and a /blog. My goal is to have the front page be a grid of hand selected images (similar to a portfolio). I would like to be able to easily switch the images are ...
-2
votes
1answer
2k views

How to place an image into header.php? [closed]

I'm trying to customize twentyten theme. this is part of header.php: <body <?php body_class(); ?>> <div id="wrapper" class="hfeed"> <div id="header"> <img id="topL" ...