I have upgraded a neglected Wordpress installation the was a few versions off.
After the installation and upgrading multiple version, all of my images are now broken which were not before. Whenever I trace the filename back to the directory it should be in I see the same thing - the image is in existance, however Wordpress has appended a dimension x dimension to each of the references inside of Wordpress.
See what I mean:
I have tried all solutions offered for similar WP issues however none have solved the problem.
After following this thread https://wordpress.org/support/topic/after-upgrade-to-44-media-files-are-not-showing I recieved a server 500 error.
Adding this conditional showed me the add_filter does not available inside functions.php
if (function_exists('add_filter')){
add_filter('wp_get_attachment_image_attributes', function($attr) {
if (isset($attr['sizes'])) unset($attr['sizes']);
if (isset($attr['srcset'])) unset($attr['srcset']);
return $attr;
}, PHP_INT_MAX);
add_filter('wp_calculate_image_sizes', '__return_false', PHP_INT_MAX);
add_filter('wp_calculate_image_srcset', '__return_false', PHP_INT_MAX);
remove_filter('the_content', 'wp_make_content_images_responsive');
} else echo 'No function exists for this method!';
Could someone please help me get Wordpress to stop referencing my images by the incorrect filename? Any help on this would be fantastic. Also when does Wordpress come up with these dimensions... are they specific to the viewport size or are these theme specific?
Please also note I have turned off all plugins and reverted to the default Wordpress theme as advised on the WP support site.
Thanks SO!
Update: Since none of the suggestions so far worked I will go back to an older version before responsive images feature is introduced and I will migrate again. I will let everyone know my progress. I am inclined to think that this is caused by removing the images during the installation (they were being scanned to make sure there was no virus/malware hidden in the images from the old infected box)