SELECT 
  PI.product_id, 
  F1.id AS file_id, 
  F1.path AS file, 
  (
    SELECT 
      PI1.alt 
    FROM 
      `cscart_products__images` PI1 
    WHERE 
      PI1.original_file_id = F1.id
  ) AS file_alt, 
  F2.id AS big_file_id, 
  F2.path AS big_file, 
  (
    SELECT 
      PI2.alt 
    FROM 
      `cscart_products__images` PI2 
    WHERE 
      PI2.watermark_big_file_id = F2.id
  ) AS big_file_alt, 
  F3.id AS small_file_id, 
  F3.path AS small_file, 
  (
    SELECT 
      PI3.alt 
    FROM 
      `cscart_products__images` PI3 
    WHERE 
      PI3.watermark_small_file_id = F3.id
  ) AS small_file_alt 
FROM 
  `cscart_products__images` AS `PI` 
  LEFT JOIN `files` AS `F1` ON `F1`.`id` = `PI`.`original_file_id` 
  LEFT JOIN `files` AS `F2` ON `F2`.`id` = `PI`.`watermark_big_file_id` 
  LEFT JOIN `files` AS `F3` ON `F3`.`id` = `PI`.`watermark_small_file_id` 
WHERE 
  `PI`.`product_id` = 32432

Query time 0.00059

Result

product_id file_id file file_alt big_file_id big_file big_file_alt small_file_id small_file small_file_alt
32432 414941 https://s3.timeweb.cloud/482029f9-prod/products__images/32432_8511b1c4dce2_33433_858e2b7f24a9_32432_fcffa5692d07_32433_da46dbca55db_0_2253f30184a2_IMG_4050jpg 414942 https://s3.timeweb.cloud/482029f9-prod/products__images/32432_4329376a72e9_33433_858e2b7f24a9_32432_fcffa5692d07_32433_da46dbca55db_0_2253f30184a2_IMG_4050jpgwebp 414943 https://s3.timeweb.cloud/482029f9-prod/products__images/32432_4e208e97e07a_33433_858e2b7f24a9_32432_fcffa5692d07_32433_da46dbca55db_0_2253f30184a2_IMG_4050jpgwebp
32432 414944 https://s3.timeweb.cloud/482029f9-prod/products__images/32432_df7371e43231_33433_af1fd59f31dc_32432_ea04e5f591a2_32433_0a5ce9d472ae_0_8c232ba1f619_IMG_4053jpg 414945 https://s3.timeweb.cloud/482029f9-prod/products__images/32432_5a920ba0193a_33433_af1fd59f31dc_32432_ea04e5f591a2_32433_0a5ce9d472ae_0_8c232ba1f619_IMG_4053jpgwebp 414946 https://s3.timeweb.cloud/482029f9-prod/products__images/32432_114ae1b4fa40_33433_af1fd59f31dc_32432_ea04e5f591a2_32433_0a5ce9d472ae_0_8c232ba1f619_IMG_4053jpgwebp
32432 414947 https://s3.timeweb.cloud/482029f9-prod/products__images/32432_4f4659ddc3dd_33433_da6ef6bb797f_32432_0e5ea5c0e7d9_32433_fcf54e1313d7_0_597158d388f8_IMG_4048jpg 414948 https://s3.timeweb.cloud/482029f9-prod/products__images/32432_a6d9de5bd89f_33433_da6ef6bb797f_32432_0e5ea5c0e7d9_32433_fcf54e1313d7_0_597158d388f8_IMG_4048jpgwebp 414949 https://s3.timeweb.cloud/482029f9-prod/products__images/32432_e24a8cbcb1a8_33433_da6ef6bb797f_32432_0e5ea5c0e7d9_32433_fcf54e1313d7_0_597158d388f8_IMG_4048jpgwebp
32432 414950 https://s3.timeweb.cloud/482029f9-prod/products__images/32432_1d2297dfb096_33433_3f53e9a00958_32432_c2252caa443f_32433_67dfea39a305_0_3b8e9574f1a2_IMG_4049jpg 414951 https://s3.timeweb.cloud/482029f9-prod/products__images/32432_85a5d78ef830_33433_3f53e9a00958_32432_c2252caa443f_32433_67dfea39a305_0_3b8e9574f1a2_IMG_4049jpgwebp 414952 https://s3.timeweb.cloud/482029f9-prod/products__images/32432_9d3e2e7cb070_33433_3f53e9a00958_32432_c2252caa443f_32433_67dfea39a305_0_3b8e9574f1a2_IMG_4049jpgwebp
32432 414953 https://s3.timeweb.cloud/482029f9-prod/products__images/32432_59056737ba37_33433_0f487acca7c7_32432_33996627307c_32433_c3eeb222869a_0_ad34b782fa9b_716306CC-7398-4C4F-91AF-20DB 414954 https://s3.timeweb.cloud/482029f9-prod/products__images/32432_f856e4d7be3c_33433_0f487acca7c7_32432_33996627307c_32433_c3eeb222869a_0_ad34b782fa9b_716306CC-7398-4C4F-91AF-20DB 414955 https://s3.timeweb.cloud/482029f9-prod/products__images/32432_39b9b6a27bf7_33433_0f487acca7c7_32432_33996627307c_32433_c3eeb222869a_0_ad34b782fa9b_716306CC-7398-4C4F-91AF-20DB