Using Jetpack carousel w/o creating a gallery [closed]

Adding another better solution: This displays only the first image in a gallery, linked to launch the carousel. You would make that first image, and it’s caption, clearly indicate it as a link to a gallery. Give gallery an HTML ID: <div style=”display:none”> </div> Then add CSS: #gallery-link .tiled-gallery-item { display: none; } #gallery-link .tiled-gallery-item:first-child … Read more

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

You can get the ID for the attachment with $attachment_id = get_field(‘field_name’);. When you have the ID you can use wp_get_attachment_metadata() to get the info associated with the image in an array. The images width and height are stored in cells named width and height. $attachment_id = get_field(‘field_name’); $metadata = wp_get_attachment_metadata($attachment_id); $width = $metadata[‘width’]; $height … Read more

Slider/text combination plugin

I don’t know of a plugin, but you could do it yourself. Structure : Each slide is a post. Each post contains text and one image (uploaded throught media uploader) To target the proper post, you could use differents techniques, the simpleiet is to use a category i.e. : “slider”. Where you want to use … Read more

Mass crop images: Landscape images -> Portrait images

In media settings change: Crop thumbnail to exact dimensions (normally thumbnails are proportional) to unchecked. This will fix the problem on new images. For old already imported images, you’ll need to regenerate them. There are many plugins that can do this. This plugin is well known: http://wordpress.org/extend/plugins/regenerate-thumbnails/

Remove height attribute from wp_get_attachment

This worked for me. function remove_width_and_height_attribute( $html ) { return preg_replace( ‘/(height|width)=”\d*”\s/’, “”, $html ); } and then change wp_get_attachment_image_src( $attachment_id, ‘full’ ); to remove_width_and_height_attribute(wp_get_attachment_image_src( $attachment_id, ‘full’ ));

I have no images in an activated wp theme

images folder is inside theme’s folder. But relative URLs do not work that way. They are relative to the URL not to the filesystem path. Your problem is here: <img id=”thinker01″ src=”https://wordpress.stackexchange.com/questions/74779/images/thinker01.png” width=”120″ height=”163″ /> If you look at the request (via HttpFox or other means) you will see that the browser is looking for … Read more

Large image upload size (using timthumb.php

Instead of using timthumb, use the internal image API. Firstly, specify the custom size you’re wanting to use by using add_image_size: Usage: <?php add_image_size( $name, $width, $height, $crop ); ?> So you would put this in your themes functions.php: add_image_size( ‘large_post_image_header’, 660,246,true); Then, instead of: <?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), ‘full’ ); ?> … Read more

Get custom thumbnail sizes [duplicate]

This is answered here: Get post thumbnail size global $_wp_additional_image_sizes; // Output width echo $_wp_additional_image_sizes[‘main_image’][‘width’]; // Output height echo $_wp_additional_image_sizes[‘main_image’][‘height’];