The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
3answers
2k views

Wordpress 3.5 - Add custom image size

Since the new version of Wordpress (3.5), it seems to be an incompatibility between the image manager and the custom image sizes. Previously I used in my functions.php : add_action( ...
0
votes
2answers
448 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
2answers
237 views

the_post_thumbnail('medium') still gives thumbnail-size img

All the sources mention this as if it worked. Medium size is set to 635x194, but I still get this out: <img width="100" height="100" title="fjaril" alt="fjaril" class="attachment-thumbnail" ...
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: ...
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', ...
0
votes
1answer
84 views

How to get default image sizes attribute

How do I get the height and width of default image sizes? I am not talking about custom image sizes, which can be retrieved from get_intermediate_image_sizes(). I want to get size attribute for ...
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 ...
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 ...
2
votes
2answers
552 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 ...
5
votes
2answers
707 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. ...
-1
votes
2answers
2k views

With get_the_post_thumbnail I want the image to be 100% wide

I have a WP site whose center column is variable width. I would like the featured image to appear front and center - 100% width. If I hard code the image path using a plain old image tag with ...
1
vote
1answer
60 views

Difficulties setting a maximum image width

Currently I have this written in my functions.php: if ( ! isset( $content_width ) ) $content_width = 560; If I understand correct, this should re-size a relatively large image (1024x1024px) to an ...
1
vote
1answer
750 views

Automatically replace original uploaded image with large image size

As our users regularly upload ~6MB images to use on the website (and aren't too familiar with how to resize them first), WordPress stores the originals as well as resizing them to several different ...
0
votes
1answer
823 views

How do I retrieve an image's width and height using Advanced Custom Fields?

Using a get_field('sampleImage'), how would I go about in order to get the image's width and height using the ACF plug-in? I need to be able to print out the img tag with width and height attributes ...
1
vote
0answers
36 views

How do you alter the default WordPress thumbnail?

I have selected 'thumbnail' under 'Apply changes to:', however, nothing seems to happen in either the media library or on the site. I've also tried regenerating the images after making changes, 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 ...
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 ...
0
votes
2answers
3k views

How do I get gallery thumbnail URL and change the default thumbnail size?

when I create a gallery I get this code generated yet I can;t find out how <img width="150" height="150" src="http://localhost/wp2/wp-content/uploads/2012/06/28_0120-150x150.jpg" ...
0
votes
1answer
790 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 ...
0
votes
1answer
84 views

add_filter with specific thumb names

How would I run add_filter only on some specific registered thumbnail sizes '$size' ? like 'large' , 'medium', etc?
1
vote
1answer
343 views

add_image_size in a Plugin i created

I created a plugin and i need to use add_image_size in it. I know how it work in the function file and for a theme, but how can i implement this in a plugin? I want new images uploaded by wordpress ...
0
votes
2answers
69 views

Issue with images which have no sizes available

I noticed that, in older images uploads of mine, the sizes aren't properly available. The original files shows up but there aren't sizes linked to the image, and full size displays : "Full Size (0 x ...
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 ...
2
votes
1answer
176 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 ...
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 ...
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 ...
0
votes
2answers
3k views

Page speed error: “serve scaled images”

I made a test on GTmetrix.com and I got a pretty bad grade regarding the Page Speed (D or F). The worse error is the following: Serve scaled images (grade F): some image URL is resized in HTML or ...
1
vote
1answer
318 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 ...
0
votes
3answers
2k views

How can I get a different image size, if all I have is the link?

For various reasons, I can't use Wordpress' built-in Thumbnail functionality. What I want to do instead is to use the first image in the post as the thumbnail. Here's what I found in the codex: Show ...
0
votes
1answer
488 views

changing the default picture size link url

when i'm inserting a single picture thumbnail from the gallery with a link to the original picture, it gives me this: <a ...
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 ...
0
votes
1answer
136 views

A little confused as to what add image size actually does

I have a call to add_image_size like so: if ( function_exists( 'add_theme_support' ) ) { add_theme_support( 'post-thumbnails' ); } if ( function_exists( 'add_image_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, ...
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 ...
1
vote
1answer
829 views

How to remove attachments size attribute [duplicate]

Possible Duplicate: Prevent Width and Height Attributes in Image Tag Output i would like to remove the width="512" height="128" attributes on an attachments this method is fine on images ...
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( ...
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 ...
0
votes
1answer
748 views

Image resizing - TimThumb vs convert on upload?

I'm using jQuery Supersized to display a full screen background slideshow on my blog, and I'm using mobile detection to serve a smaller version of the images to mobile devices so it will load faster. ...
0
votes
1answer
91 views

Best way to receive special images in posts

Okay, this is what I'm thinking about (and it's not a coding problem right now, but my fundamental thoughts): How to receive / input images in posts for special uses, let's say a customized portfolio ...
0
votes
2answers
771 views

How to Resize the Custom Post Images?

am Having Custom Field named as thumb.i want to show the images using these custom fields.i want to be fix the image size. My code is <img class="thumb" src="<?php echo ...
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 ...
1
vote
2answers
788 views

Set Maximum Width for an uploaded image

I want to restrict the width to a maximum of 600px for images uploaded using the "full size" image option in WP posts/pages section. I've tried two methods: Method 1: Adding the following to ...
0
votes
1answer
61 views

Plugin that will let me specify a number of image sizes?

I've designed a grid-based portfolio theme for a photographer; for each portfolio item, I need six different images, all of which have a fixed size. However, no two sizes are alike. Is there a ...
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 ...
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 ...
0
votes
1answer
693 views

Slidedeck Pro Wordpress Image Size

I was using Slidedeck pro wordpress (dynamic slider), and set it to pull in the first image from the post's gallery as the image. However, it keeps resizing the image down to 270px when I really need ...
0
votes
2answers
412 views

Change the avatar ratio?

Is there any way to change the aspect ratio of the WordPress Avatars? Or is this hardcoded? Greetings, .wired
4
votes
1answer
518 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 ...
1
vote
1answer
887 views

Wordpress Fancybox Resize Large Image

I have a wordpress users that aren't very good at resizing images so when they upload an image to wordpress it's still big > 3000px. They can import into a post and a thumbnail is generated. When ...
4
votes
1answer
710 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 ...