Recently ran into an issue where my cucumber suite was throwing a timeout error. The error was thrown because an image hosted externally wasn't rendering.
Luckily Phantomjs has some amazing Command Line Options available to help us along. On of which is
--load-images which allows us to prevent phantom from making the image request.
Let's setup poltergeist (Phantomjs' capybara driver) to accept these options...
As you can see we can specify a list of the CLI options and they'll be set when we run our suite. And there you have it, prevent phantomjs from requesting images!
Thanks for reading!