Images sitemap generation is accomplished using a crawler that scan your site looking for images to include in your sitemap.
This operation when you have hundreds of links may require several minutes to complete.
In the configuration of JSitemap you will find a setting to limit number of requests used to generate images sitemap. Reducing this value can decrease the total time needed to complete sitemap generation and avoid server timeout. By default the parameter is set to scan 50 links. You can progressively increase this value if you have more links, trying to generate the sitemap and ensuring that the process completes without server error and timeouts.
Of course this may have the side effect to not scan fully your site and so skipping some links and images. In this case you can better use the advanced AJAX generation and precaching features added in the version 2.3 of JSitemap to have a full images sitemap generated step by step.
If you experiment issues about the images and videos sitemap crawler, you can perform the crawler test to check if it's able to work properly or if it's blocked for some reasons, for example if your hosting provider disallows loopback connections or has a firewall blocking crawlers. In the component configuration you find a button named 'Crawler test' to display the response page given by your server.