New answers tagged

-1

The default image sizes of WordPress are “thumbnail”, “medium”, “large” and “full” (the size of the image you uploaded). These image sizes can be configured in the WordPress Administration Media panel under Settings > Media. This is how you can use these default sizes with the_post_thumbnail(): the_post_thumbnail(); // without parameter ...


1

With this code in header.php and some tweaks I fix it and I disable social yoast and activating another plugin open graph which let me choose what tags I want. <?php global $post; $src = wp_get_attachment_image_src( get_post_thumbnail_id( $post -> ID ) , 'thumbnail' ); if(strlen($src[0])){ echo '<meta ...


0

The way around this is pretty simple, however. You can just install a plugin that automatically sets the featured image from the first image in a post. Of course that means you will need to make the animated image the first image, but at least it’s a workaround. There are a number of plugins that will let you automatically set your first image as the ...


0

If you need to control the image that is used when shared to facebook, might I suggest doing the following within Yoast SEO: Once the plugin is installed, you will have a Yoast SEO settings panel below your post and page editor. On this panel there is a social tab. Within this tab you are given the ability to edit the image used when users share via ...


1

It's because those GIF images exceeds the max-size supported by Facebook open graph ( 8Mb ). Check the debugger for Open Graph here For instance for post vbnvnvb , debugger show this error


1

You can use media_sideload_image() which will take a link to a file and upload it to the media library. You do need to pass it some kind of $post_id @Sumit points out in the comments you could pass NULL into the $post_id field. media_sideload_image( $file_url, $post_id, $image_desc, $return ); If you need the uploaded image ID, take a look ...


1

The problem is that you are using functions from GD library to manipulate images, not functions from WordPress Image API (WP_Image_Editor class). So, WordPress things doesn't apply to the generated image by your code. WordPress Image API uses ImageMagick if available, otherwise it uses GD library. In order to keep EXIF data: If GD library is used, you ...


-1

You should not assume that image related metadata survives the wordpress image manipulation. As you found out it depends on the image manipulation library installed on the server, and actually in version 4.5 the aim would be to strip some of it as noted here https://make.wordpress.org/core/2016/03/12/performance-improvements-for-images-in-wordpress-4-5/. If ...



Top 50 recent answers are included