I've written an interface for Magento 2 admin that allows creation and editing of key product attributes from a phone.
Once a product is created and it's images attached to the product, I have been looking for a quick way to select from a gallery which is the main image.
For each store view and attribute I found running the following immediate changes the image in the admin panel.
INSERT INTO `catalog_product_entity_varchar` (`attribute_id`, `store_id`, `entity_id`, `value`) VALUES (?,?,?,?) ON DUPLICATE KEY UPDATE `value` = ?
I'm entering the correct attribute values for swatch, image, small_image and thumbnail, for all stores the product is present in and adding the filepath accordingly.
The frontend image however, remains unchanged and worse still, the image then doesn't change from the admin panel unless i clear all the cache's and reindex.
I'm not using flat products so I'm a bit stumped as to what could be stopping the image from changing.