Why is wordpress searching for @2x images?

I’ve created some images for my site with the following path:

/wp-content/themes/my-theme/images/my-image.png

I edited my sites HTML to include this image (and other’s like it). Now in my console I have a whole bunch of error messages:

Failed to load resource: the server responded with a status of 404 (Not Found) -

/wp-content/themes/my-theme/assets/images/[email protected] 

I looked up @2x and I found that it has to do with different pixel density images. But why is it even trying to find this image? I didn’t tell it to. Is this something wordpress does automatically? Do I have to create a @2x image for every image I add to my site? And why is it searching the assets folder?

1 Answer
1

Despite having no plugins installed through wordpress, I did have retina.min.js being enqueued in my functions.php file from the template I downloaded.

Retina.min.js (source: http://imulus.github.io/retinajs/) looks for high resolution versions (denoted with suffix @2x right before the extension) of each image in your site and attempts to replace them if any are found. Since I did not plan on using this feature for the time being, I commented it out of my functions.php file and I now have a clean console.

Leave a Comment