D
D
Denis2019-12-24 14:40:58
1C-Bitrix
Denis, 2019-12-24 14:40:58

The picture is not displayed in bitrix, I don’t understand why?

Tell me who knows. Hotsu display your pictures in Bitrix through properties. The "bitrix:news" component added WHOO properties for the test (see screenshot), everything works

<p>Автор: <?echo $arResult["PROPERTIES"]["WHOO"]["VALUE"];?></p>

I add the PHOTO property, I expect that in the array ["PROPERTIES"] ["PHOTO"] I will find a link to the file, but it is not there.
5e01f8eb81338624584398.jpeg
Screenshots are attached for a clearer picture.
5e01f91e03e18708021544.jpeg
5e01f934666a6060684738.jpeg
5e01f93d57d82570181677.jpeg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton, 2019-12-24
@Drumsid

$img_resize_path = CFile::ResizeImageGet(
      $arResult[PROPERTIES][PHOTO][VALUE][0],
      array('width'=>'100', 'height'=>'150'),
      BX_RESIZE_IMAGE_PROPORTIONAL
    );
echo $img_resize_path[src];

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question