S
S
Sergey2021-03-18 01:29:55
MODX
Sergey, 2021-03-18 01:29:55

Fenom MIGx image output via phpthumbon, something to fix?

The image output code is as follows:

<img class="portfolio-img" src="{'assets/files/'~ $row.licimage | phpthumbon : 'w=1280&h=720&zc=0'}" alt="{$row.licalt}" title="{$row.licalt}">

got this in inspector:
<img class="portfolio-img" src="assets/files//assets/cache_image/noimage_0x200_16b.jpg" alt="alt" title="alt">

The image is naturally not displayed, something is missing, I don’t want to display it as a snippet.

DECISION:
{set $image = 'assets/files/' ~ $row.licimage}
<img class="portfolio-img" src="{$image | phpthumbon : 'h=360&zc=0'}" alt="{$row.licalt}" title="{$row.licalt}">

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Lunegov, 2021-03-18
@alelunegov

<img class="portfolio-img" src="{$row.licimage | phpthumbon : 'w=1280&h=720&zc=0'}" alt="{$row.licalt}" title="{$row.licalt}">

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question