Imager - connection refused error All assets on my website work properly, however I cannot resolve an issue with Imager plugin on a single page template.

My template:

    {% set profileImage = entry.user.photoUrl('original') %}
    {% set transform = {width: 90, height: 90, effects: { grayscale: true, gamma: 1.2 } } %}
    {% set transformedImage = craft.imager.transformImage(profileImage, transform|merge({width: 180, height: 180})).getUrl() %}

        {% if profileImage %}
            &lt;figure&gt;
                &lt;span style="background-image: {{transformedImage}}"&gt;
                    &lt;img src="{{ transformedImage }}"/&gt;
                &lt;/span&gt;
            &lt;/figure&gt;
        {% endif %}


When I try to open a page which uses this template I got the Craft Exception: 


  cURL error “7” encountered while attempting to download
  “http://127.0.0.1:8001/cpresources/[...]/myImage.jpg/?d=1553875482”.
  The error was: “Failed to connect to 127.0.0.1 port 8001: Connection
  refused”


But when I open the image link directly it works normally. Checked permissions many times. What can be an issue here?

Thanks
Ok, so @brad-bell suggested a fix and the solution was to disable ::1 localhost rule from my /etc/hosts file. After that change all images are working properly. 

More details can be found here https://stackoverflow.com/questions/22952676/curl-failed-to-connect-to-localhost-port-80 

Thanks!