Check if image exists in PHP?

You can use file_exists:


but, that won’t work if some server settings don’t allow to check for a file.

A simple alternative ...

Jssor aspect ratio?

There is an easy fix to get a good aspect ratio for your pictures, using jssor.

Open jssor.slider-22.1.9.min.js or the file you embed in your html page.

Search for ...

Remove  html code (php)

If you see this character appearing in your page, you might have something like this in the header:


Replace it with something like ...