The tag has no wiki summary.

learn more… | top users | synonyms

11
votes
5answers
3k views

Resizing images to the actual size used in the editor?

Is there a way to resize images to the actual size they will be shown in the post? I have users that import a large image and then resize it in the visual editor. This is easy, since they can just ...
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, ...
10
votes
5answers
2k views

Minimum Dimensions Requirement for Featured Image?

I am creating a baseball website with multiple Authors. From past experience, no matter how well you know someone personally, it doesn't mean they will follow or even read your instructions. That ...
10
votes
1answer
151 views

Reject upload of wrong-sized images using the Media Uploader

I'm working on a super-strict setting for adding images to Custom Fields in the Post Edit screen. My optimal scenario would be to add a a Custom Error message when the user tries to upload an image of ...
8
votes
1answer
1k views

How to disable generation of default image sizes for some custom post types?

I used custom post type, where 'thumbnail', 'medium' and 'large' sized not required. I need to disable this sizes and create function or plugin, where i can set, which image size is required for each ...
7
votes
2answers
4k views

How to Require a Minimum Image Dimension for Uploading?

I need a way to restrict authors from uploading a images bellow a specific dimensions. Say I only want to allow uploading images that are at least 400px x 400px. If the image size is smaller, the ...
7
votes
1answer
2k views

Set default image sizes in WordPress to hard crop

How do I set the medium and large images sizes in WP to hard crop? In my theme I can set the thumbnail size to hard crop using this: add_theme_support('post-thumbnails'); set_post_thumbnail_size( ...
7
votes
1answer
3k views

How to Dynamically Resize WordPress Image On-The-Fly (custom field/theme option)

So - at a client's request, I am in need of being able to resize an image not the standard WordPress way... but from an image pulled-in from a theme option. I can't simply use the custom_header area, ...
6
votes
3answers
9k views

Add new image size to media uploader so users can insert into post?

I would like to create an additional size for uploaded images which my users can then "insert into post". I understand that add_image_size() will add a new image size which I can use in my theme, but ...
6
votes
1answer
647 views

Changing JPEG compression depending on image size

Short. I want ''large' images compressed by 90%, and 'medium' to be by 60%. Has many af you know, sometimes larger images suffer from high compression, but other small images don't. This function ...
6
votes
6answers
2k views

Display thumbnail only if requested size exists

When I use the functions that get and output the post thumbnail, they will display the requested thumbnail in the size you specify, but if this size doesn't exist they will display the thumbnail in ...
5
votes
2answers
709 views

Adding a custom image upload size and making it selected by default?

How can I add a custom image upload size with a width of 550px and make it selected by default in the Add Media page? Currently, there are 4 sizes available: Thumbnail, Medium, Large and Full Size. ...
5
votes
1answer
60 views

Change the filename format of saved featured images

Does anyone know how I could change the way wordpress saves the featured image's additional image sizes? Right now I have the main image saving like so: test_builder_banner_2.jpg and for each ...
5
votes
2answers
417 views

Retina images - custom syntax for inserting images into post content

I am currently in the process of building a responsive real estate WordPress theme and I'm figuring out how to properly add support for HiDPI screens. I decided to use a JavaScript solution ...
4
votes
2answers
1k views

Set JPEG compression for specific custom image sizes

I use various custom image sizes (by add_image_size) and I have set my JPEG compression to 30% with this filter: function jpeg_quality_callback($arg) { return (int)30; } add_filter('jpeg_quality', ...
4
votes
1answer
711 views

How to resize images in wordpress without adding any compression or changing the color profile of the images, possible?

As you can guess from the title, Im looking for a solution that allows me to alter the way Wordpress processes/saves its newly created images according to the media settings in the dashboard. This is ...
4
votes
1answer
519 views

Featured image with the same height thumbs returns wrong thumb

I have 2 sizes thumbs for featured images with the same height: 300 x 200 540 x 200 I've checked the uploads folder and both thumbs with different sizes appear correctly: file_name-300x200.jpg ...
3
votes
4answers
555 views

Each custom image size in custom upload directory?

I want to upload my custom image sizes in custom folders. The folder should have the name of the selected width. For example: If I add these custom sizes... add_image_size('custom-1', 300, 9999); ...
3
votes
3answers
4k views

Resizing all images

I have just changed the theme on my blog, and because of a small page width, it breaks the layout. Most of my earlier images (attached in posts) are around 600px in width, and now I need to resize all ...
3
votes
2answers
3k views

How to delete outdated, wrongly sized images in _wp_attachment_metadata?

I've got several custom image sizes for my blog. One of these is setup as add_image_size( 'slide', 640, 290, true );. These are used in a header slideshow. My problem is I've upped the dimensions of ...
3
votes
4answers
472 views

Downsizing Many Large Images Attached to Posts, in Bulk?

(Moderator's note: The original title was: "Shrink full size images in post") I built a WordPress site for someone and they entered a ton of posts with images that are wider than the content area. Is ...
3
votes
1answer
48 views

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 ...
3
votes
1answer
52 views

Confused about image sizing business in Wordpress

I'm creating my first Wordpress theme and I've got everything working fine, and by following this tutorial and few others I've understood how to add custom image sizes by using add_image_size() ...
3
votes
3answers
921 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
198 views

Filter what image sizes get generated

I'm looking for a way to chose what images sizes get generated by image. With all the image sizes I have plus a lot of images, in the end I have a whole lot of server space being used up for nothing. ...
2
votes
1answer
3k views

Featured Image Size

I am in the process of developing a new theme for my blog and am making a featured content slider. The issue that I am having is getting wordpress to force the image to the dimensions that I want it ...
2
votes
2answers
2k views

Stop wordpress from creating multiple size images

I want wordpress to stop making multiple size images cause it's going to eat up my storage space. So I went Settings > Media and then set all the sizes to 0. When I uploaded a new image it still is ...
2
votes
2answers
1k views

How to get a list of all the possible thumbnail sizes set within a theme

What function can I use in a plugin to get the dimensions of every image size (in an array preferably) that is defined in a child theme? Just for clarification I am not asking how to create a new ...
2
votes
2answers
1k views

Can Wordpress resize BMP files?

Interesting situation i just ran into. I have a site I am developing in which I have defined specific image sizes I want created whenever a new image is uploaded. Currently lets just say that I ...
2
votes
3answers
2k views

Showing a placeholder/default img, if no featured image is set

I need to modify the following code to show a placeholder if there is no featured image available. I understand that I need to add a if statement in the following code but wasn't sure of the exact ...
2
votes
1answer
2k views

Convert uploaded PNG to JPEG automatically

Is there a way to convert automatically uploaded PNGs to JPEGs and keep the original? In other words, let the user upload a PNG, but show in wordpress (thumbnails, large, medium, etc) the JPEG version ...
2
votes
5answers
3k views

Media gallery - inserting full size images without link

I want to use built-in WP media gallery. I'm trying to simply add images in one - horizontal line. I want images with original size and without any link. I'm trying to add/edit some code into ...
2
votes
1answer
470 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
3k views

No Thumbnails Generated

I setup WordPress on my own server and it's up and running...one thing that I have noticed is that WordPress doesn't generate any images I upload. Usually when I upload an image through WordPress it ...
2
votes
2answers
555 views

How to set the width and height rule for featured image

I want to know how to make rules to re-size the images for featured image? I am uploading an image in featured image section but it is not cropping the images in exact width and height for all the ...
2
votes
1answer
177 views

Why are extra 92 pixel square thumbnails created?

Disabling this WordPress feature which automatically generates various sizes of an uploaded image, is normally as simple as going to WordPress Dashboard > Settings > Media screen and changing all ...
2
votes
2answers
396 views

Importing media medium setting image gallery / image attachments

I have recently imported an image gallery to a clean WP install as I am deploying the site to a live domain. I have imported the posts but the images use the medium size for attachements. I would ...
2
votes
4answers
2k views

Extract & Display the REAL first image attached to a post - extend the_post_thumbnail()

I have an interesting problem which I am sure someone here can solve. I have gone through a bunch of different plugins and code snippets in search for the perfect code to extract a primary image to be ...
2
votes
1answer
2k views

How to create thumbnails with a fixed width, so all of them will have the same width?

right now, a thumbnail will be either 150px in height or in width, depending if it's landscape or portrait. Is there a way to make them always the same width and scale them in height accordingly, ...
2
votes
0answers
326 views

Attachment 0×0 size error [closed]

My theme uses 8 different thumbnail sizes. I imported my local installation to the final server using phpmyadmin to export the wordpress database. Everything is smooth except for the attachments: many ...
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
4answers
660 views

Limit author image size

Is there a way to limit the size (dimensions) of the image a user can upload to their profile? It looks like Wordpress does do some kind of limiting as uploading a 1024x768 image the result gets ...
1
vote
2answers
175 views

Why won't these imported images show up?

I recently imported posts from another WP install, and everything seemed to go smoothly - except in specific cases where images are placed into a Post with the dimensions in the url. For example...we ...
1
vote
1answer
2k views

How to scale image with equal width and height without distortion?

I have a section on my frontpage that querys through recent posts and grabs the title and thumbnail of each. In my functions.php, I've specified a width and height for the thumbnail using: ...
1
vote
1answer
962 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: ...
1
vote
1answer
212 views

wp_get_attachment_image_src() width and height boolean

I have the following code in my theme: <?php $size = 'large'; $postimage = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), $size ); $url = $postimage[0]; $h = $postimage[2] ...
1
vote
1answer
179 views

Resizing Images for a Gallery-Plugin?

I'm currently working on a gallery plugin similar to the one found on Posterous. I'm needing all images in the gallery in a very small thumbnail-size. Probably only 50px wide. What's the best ...
1
vote
1answer
1k views

resize images not crop

Looking for a hack to resize images on upload (all forms of image uploads on wordpress) to exact dimensions, but not to crop. I will open a bounty for this question since I believe It can be of help ...
1
vote
1answer
319 views

Get the bare URL for an attachment

I'm trying to get the link to the thumbnail size of an attachment image. I tried this: wp_get_attachment_link( $img_id, 'thumbnail' ); but it returns the actual HTML for the image wrapped in a ...
1
vote
2answers
200 views

Large size image breaks template layout

If I upload a large size image inn my wordpress, the image breaks my template width. I have seen some templates which scale the large image's width to the maximum width of the post div. What CSS or ...