Adding srcset to an image in ajax

wp_get_attachment_image_srcset is the key here: wp_get_attachment_image_srcset( int $attachment_id, array|string $size=”medium”, array $image_meta = null ) I believe the missing information you lack, is that post thumbnails are actually an attachment ID. In combination with get_post_thumbnail_id you should be able to generate srcset values. But also keep in mind that while googling, every question I found … Read more

Cropped image file size larger than original, is it normal?

Yes, this is normal, given how ImageMagick, the PHP image editor WP uses by default, resizes images. Actually, it first expands the image and then scales it back again, sticking to its own resizing quality settings, not the one of the source image. So, if you have a low quality image (say, 93.8 kb at … Read more

Errors and warning with padlock sign when site moved to SSL

As mentioned in the other answer, that’s because the URL for the image is http, not https, so you get a ‘mixed content’ message from the browser. Equivalent to “You are on an https connection, but one of the images you got came from a http connection. That means that that image is not being … Read more

Migrated site – Images have 404 error

It looks like your localhost site had WordPress installed in the root directory but your production site is in a sub-directory. You should review the instructions in the the WordPress Codex for Moving WordPress to see if you missed any steps. It describes both moving a WordPress installation from one server to another, and moving … Read more

Alt Image WordPress [closed]

Unless your theme uses some type of hook to add the logo, there is probably not a solution in functions.php. Your best bet is to look through the different PHP files in your theme to figure out where the logo is being added with no alt text. From there, ideally you would check to see … Read more