I read the documents and look like you need to have slimerjs http://docs.casperjs.org/en/latest/events-filters.html in order to get responseData.body from the page.resource.received event.
My use case is to download the images when the page is loaded so I don't do another round trip of: get the resource JSON, download and save any image file, reload the file to check for image dimension and if too small (icons) -> eliminate.
I am wondering if there is a better way to do this. I could in fact go do evaluate img selector but some websites use background-url css and that's tricky.
Evaluate can be tricky, but here is a possible approach : (PhantomJS Only)
With this example theres the possibility of
storing the
clipRectsof the images matching specific criteria for posteriorpage.render()of those elements into screen shot files.storing the urls of the matching resources for posterior download requests
capturing the url inside 'src' attribute or the 'background-image' css property, with an attempt of also obtaining the width & height for criteria match-and-capture purposes.