When using imagecreatefromjpeg() and passing it a URL to an exteal image ( fetching 10 images per page, since pagination is set ), it works on pages 1-7 for example and fetches the images correctly, but when it comes to page 8 in most cases, it needs about 2 minutes to execute fetching of 10 images for that page and gives this error: Php error for imagecreatefromjpeg()
I've googled this issue the whole day and found out that in most cases, the issue is the remote host that serves these images. It is either slow or has some missconfigurations on it.
Now, I have setup displaying a default image if the image is not fetched through this PHP function, however, code still runs for about 2 minutes on page 8 for example, slowing down the website considerably.
My question is: is it possible to limit the execution time of imagecreatefromjpeg() PHP function so that it only runs for 1 or 2 seconds and stops if it doesn't fetch the image by that timeframe ?
