Website Building » WooCommerce » How Do I Remove Image Link in WooCommerce?

How Do I Remove Image Link in WooCommerce?

Last updated on October 1, 2022 @ 8:26 pm

PRO TIP: If you are unsure about how to remove an image link in WooCommerce, it is best to seek out professional help. Attempting to remove an image link without proper knowledge can result in damaging your website or causing other problems.

When you add an image to a WooCommerce product, it automatically links to the image file. This can be useful if you want customers to be able to view a larger version of the image, but it’s not always desirable. If you want to remove the link, there are a few options available to you.

One way to remove the link is to simply edit the product in question and delete the image. This will remove both the image and the link. However, if you want to keep the image but remove only the link, you’ll need to edit the code.

If you’re comfortable editing code, you can open up the product.php file in your WooCommerce folder and find the line that reads:

get_image(); ?>

Replace that line with:

get_image( ‘thumbnail’ ); ?>

This will display only the thumbnail version of your image, which won’t be linked. If you want to completely remove the image from your product page, you can replace that line of code with:

If you’re not comfortable editing code yourself, there are some plugins available that will do this for you. One such plugin is called “Remove Image Links for WooCommerce” and can be found here:
https://WordPress.org/plugins/remove-image-links-for-woocommerce/

Drew Clemente

Drew Clemente

Devops & Sysadmin engineer. I basically build infrastructure online.