• Resolved alperinbiri

    (@alperinbiri)


    Hi,

    I have various products on woocommerce (simple/variable) with images that have.png extension. I already created .jpg version of these using the exact same filename and uploaded in the same location. I’m now trying to figure out a way to replace all .png extensions to .jpg for the products.

    If anybody can help me with the query that would be greatly appreciated!

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Unfortunately what you are asking is not an easy find/replace because images within wordpress are referenced by their attachment ID. You have to create the attachment post first and then update the _thumbnail_id in your product’s postmeta.

    It might be easier for you to do an “update” import with the correct images so that woocommerce handles the attachment mapping for you.

    Plugin Support kellymetal a11n

    (@kellymetal)

    Hi there,

    You haven’t replied here in a while, so I’m going to mark this thread as resolved.

    Also, confirming @brianmurphy’s advice above — an update/merge import would be the best solution here. You could export all of your products to CSV, then update them with the new images. You can read about the built-in import/export functionality of WooCommerce here:
    https://docs.woocommerce.com/document/product-csv-importer-exporter/

    If you have any further questions, please start a new thread.

    Have a wonderful day!

    Thread Starter alperinbiri

    (@alperinbiri)

    Hi – just as an update.. Yes – I ended up using CSV to update product images, thank you for the advice!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘MYSQL query to change image extension’ is closed to new replies.