Double thumbnails?
Checkout the multiple post thumbnails plugin. It will allow you to define multiple post thumbnails for specific post types.
Checkout the multiple post thumbnails plugin. It will allow you to define multiple post thumbnails for specific post types.
i actually just finished working on a site that needed images in his feeds so i ended up using this: function ba_post_image_feeds($content) { global $post,$posts; $first_img = ”; ob_start(); ob_end_clean(); $output = preg_match_all(‘/<img.+src=[\'”]([^\'”]+)[\'”].*>/i’, $post->post_content, $matches); $first_img = $matches [1] [0]; if(!empty($first_img)){ $content=”<div>” . $first_img . ‘</div>’ . $content; } return $content; } add_filter(‘the_excerpt_rss’, ‘ba_post_image_feeds’); add_filter(‘the_content_feed’, … Read more
WordPress provides a convenient function for just this purpose: wp_handle_upload(). Assuming that you already have the appropriate file form field in your settings page, and that you’re using register_setting() for your options, and therefore already have an options validation callback, simply handle the file form field data using wp_handle_upload(). Here’s an example: <?php // Validate … Read more
I’ve had this same problem for ages and have currently landed on the following combination of plugins to resolve the issue: Media Tags Tag Gallery Cleaner Gallery Additionally, I made two modifications to the tag gallery plugin (to remove TimThumb and allow reverse ordering) This solution still has a lot of downsides including that it … Read more
This is not a answer, is an extended comment with the link to the solution. First, while testing, one of my test sites wasn’t showing the Featured Image uploaded to the folder /wp-content/uploads/POST_ID/image_name.jpg. Same problem as the OP. But, it was not displaying any path to the image. And the bug was that the installation … Read more
Picking which image sizes to generate on a per-upload basis is definitely going to be a bit involved. However, if you’re okay with just entirely removing default image sizes, you have a couple of options, as described in this article: The simplest way is to set the default image height and width to ‘0’ at … Read more
A + C: img.resize-proportionally { max-width: 100%; height: auto; } As an aside, for the above to work, you shouldn’t attempt B. Having width and height attributes in the img tag is good.
Like it was said, WordPress only generate thumbnails in the new sizes of the new media uploaded. The old images’ thumbs doesn’t get generated automatically. For this situation, I strongly recommend the following plugin: http://wordpress.org/plugins/force-regenerate-thumbnails/ It is pretty simple and unobtrusive. It just adds a new item on the wp-admin menu for you to regenerate … Read more
Since you know the location of the image on the disk you can use wp_insert_attachment to insert your big image to the media library. By default this will generate also several smaller versions of the big image that you might not need but this is the easiest way to make all the media related plugins … Read more
u can use this: function wpse128538_resize($url, $width, $height = null, $crop = null, $single = true) { //validate inputs if (!$url OR !$width) return false; //define upload path & dir $upload_info = wp_upload_dir(); $upload_dir = $upload_info[‘basedir’]; $upload_url = $upload_info[‘baseurl’]; //check if $img_url is local if (strpos($url, $upload_url) === false) return false; //define path of image … Read more