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` = 33187

Query time 0.00063

Result

product_id file_id file file_alt big_file_id big_file big_file_alt small_file_id small_file small_file_alt
33187 410444 https://s3.timeweb.cloud/482029f9-prod/products__images/33187_8bbce57d2fb1_33188_7569017a6bf0_0_ad8849258612_020fa981-6dd8-4520-9bb2-ea3b19bc3bc5JPG 410445 https://s3.timeweb.cloud/482029f9-prod/products__images/33187_60048fca719d_33188_7569017a6bf0_0_ad8849258612_020fa981-6dd8-4520-9bb2-ea3b19bc3bc5JPGwebp 410446 https://s3.timeweb.cloud/482029f9-prod/products__images/33187_2fcc94d9e424_33188_7569017a6bf0_0_ad8849258612_020fa981-6dd8-4520-9bb2-ea3b19bc3bc5JPGwebp
33187 410447 https://s3.timeweb.cloud/482029f9-prod/products__images/33187_cd34619ecac0_33188_7a690e2cf334_0_4814d095f1b5_0fa26ff0-483f-4ddf-bbb4-2b6bac562a8fJPG 410448 https://s3.timeweb.cloud/482029f9-prod/products__images/33187_2877df8b88db_33188_7a690e2cf334_0_4814d095f1b5_0fa26ff0-483f-4ddf-bbb4-2b6bac562a8fJPGwebp 410449 https://s3.timeweb.cloud/482029f9-prod/products__images/33187_434db8c20d26_33188_7a690e2cf334_0_4814d095f1b5_0fa26ff0-483f-4ddf-bbb4-2b6bac562a8fJPGwebp
33187 410450 https://s3.timeweb.cloud/482029f9-prod/products__images/33187_5d90e2bee94c_33188_058d76eac384_0_246cb0003e26_a06ec5d2-228d-4578-936d-173614162159JPG 410451 https://s3.timeweb.cloud/482029f9-prod/products__images/33187_43696a1c84e2_33188_058d76eac384_0_246cb0003e26_a06ec5d2-228d-4578-936d-173614162159JPGwebp 410452 https://s3.timeweb.cloud/482029f9-prod/products__images/33187_b9a0942872cb_33188_058d76eac384_0_246cb0003e26_a06ec5d2-228d-4578-936d-173614162159JPGwebp
33187 410453 https://s3.timeweb.cloud/482029f9-prod/products__images/33187_01b17acd6a31_33188_9676e5ead1f7_0_b292a6d070d4_a7f880a9-7589-49f9-ab77-b865f5ae291cJPG 410454 https://s3.timeweb.cloud/482029f9-prod/products__images/33187_1404ca0f465e_33188_9676e5ead1f7_0_b292a6d070d4_a7f880a9-7589-49f9-ab77-b865f5ae291cJPGwebp 410455 https://s3.timeweb.cloud/482029f9-prod/products__images/33187_8cf3e84468cb_33188_9676e5ead1f7_0_b292a6d070d4_a7f880a9-7589-49f9-ab77-b865f5ae291cJPGwebp