- strpos: documentation ( source)
- str_replace: documentation ( source)
<?php
if (strpos($imageUrl, 'https://s3-eu-west-1.amazonaws.com/localsunited/') !== false) {
echo str_replace('https://s3-eu-west-1.amazonaws.com/localsunited/', 'https://files.localsunited.nl/', 'https://s3-eu-west-1.amazonaws.com/localsunited/live/image/producttype/thumb_berenice_vest-apache-black_541ac41a9f1e9.jpg');
} else if (strpos($imageUrl, 'http://files.localsunited.nl') !== false) {
echo '';
} else {
echo 'https://s3-eu-west-1.amazonaws.com/localsunited/live/image/producttype/thumb_berenice_vest-apache-black_541ac41a9f1e9.jpg';
}