WordPress images not cropping properly

It sounds like your problem occurs before the image is cropped/ resized and displayed in the page – the original image is too small. You can require minimum dimensions for uploaded images, see: How to Require a Minimum Image Dimension for Uploading? Then, to resize the uploaded image without cropping it, define the image size … Read more

convert post title to image

In General The problem here is that you’re calling a WordPress function within a PHP file where WordPress isn’t loaded. Including WordPress in your image.php file might work if you include the post ID <img src=”https://wordpress.stackexchange.com/wp-content/themes/v2/image.php?post_id=123″ /> But imagine if you have 100 images on a single page, then you would be running 101 instances … Read more

wp_get_attachment_image() not displaying post images even though wp_get_attachment_url() echo correct urls

When saying “not working” you should include what you expect and what you get; “not working” says very little about the problem you have. Without knowing what the exact problem you have, I guess you don’t see the image. In that case I suggest to change this: wp_get_attachment_image($photo_id, ‘thumbnail’); With: echo wp_get_attachment_image($photo_id, ‘thumbnail’); wp_get_attachment_image() returns … Read more

Images showing in editor but not in post [closed]

It shows on your new site that it reflects the old domain http://deephollowfarmct.com/, if you are not planning to use your domain http://deephollowfarmct.com/, you need to re import your xml file to and do a find and replace of the string from http://deephollowfarmct.com/ to https://deephollowfarmct.wordpress.com before importing them. If you will be using your domain … Read more

Resize existing library images

Doing this on your own is actually quite a lot of work. For the sole purpose of regenerating your custom image sizes I would recommend using this plugin: AJAX Thumbnail Rebuild It allows you to loop through your Image Library and regenerate the different image sizes that you selected.

Get Image Width From WP_Customize_Image_Control() File Set in WP Theme Customizer

Modern answer to this question: We have WP_Customize_Media_Control control in WP since 4.2 that gives you the attachment id. This answer was posted on I similar question. You can see the documentation for WP_Customize_Media_Control here. Exemple of use: $wp_customize->add_setting( ‘my_menu_image’ ); $wp_customize->add_control( new \WP_Customize_Media_Control( $wp_customize, ‘storms_menu_image_ctrl’, array( ‘priority’ => 10, ‘mime_type’ => ‘image’, ‘settings’ => … Read more

Specific image size is being generated without being registered

This new feature is for responsive designs that comes with WP 4.4. Check if you have any plugin that related to responsive. If you don’t have not any, check these both: https://make.wordpress.org/core/2015/11/10/responsive-images-in-wordpress-4-4/ How do I disable responsive images in WP 4.4?

Rewrite inline image markup

Most of the code is taken from Core files, also you might have to modify it a bit as per your own requirement. Here is the core file link, where I got the idea from: https://developer.wordpress.org/reference/functions/wp_make_content_images_responsive/ You need to take care of the open p tag just before the image. Was in hurry, so instead … Read more