santa
santa

Reputation: 123

How to check if file (image) exists in TypoScript?

I'd like to check if a certain file (image) actually exists and make the output dependent on the result. How to do that in TypoScript?

Upvotes: 0

Views: 1081

Answers (2)

Tobias Gaertner
Tobias Gaertner

Reputation: 1184

Because the link to the docs is outdated, and I came here via a search engine, I would like to link to a possible solution. Here we go: Typoscript - Link a file only if it exists using URL

Upvotes: 0

biesior
biesior

Reputation: 55798

Probably the fastest solution will be using userFunc condition as described in the docs.

The sample is self-explanatory, so there's no need to put it here.

Upvotes: 2

Related Questions