Skip to main content
added 67 characters in body
Source Link
Brad Bell
  • 67.6k
  • 6
  • 75
  • 145

I am trying to load user profile pictures (the craftcmsCraft ones), but they don't load. the getPhotoUrlThe getPhotoUrl() seems to point to the wrong folder(?).

{% set users = craft.users %} 

{% for user in users %}
    <div class="searchresults"><a href="/profile/{{ user }}">{{ user }}</a> 

    {% if user.getPhotoUrl %}
        <img src="{{ user.getPhotoUrl(64) }}" class="profile_search_picture" alt="{{ entry.user.getFullName }}"/>
    {% else %}
        <img src="/img/fallback.png" class="profile_search_picture" alt="{{ entry.user.getFullName }}"/> 
    {% endif %}
    
</div>
{% endfor %}

2017/04/24 11:24:10 [error] [application] Tried to read the folder contents of /Applications/MAMP/htdocs/craft/storage/runtime/assets/sources/, but could not. 2017/04/24 11:24:10 [error] [application] Tried to read the folder contents of /Applications/MAMP/htdocs/craft/storage/runtime/assets/tempuploads/field_3/, but could not. 2017/04/24 11:24:10 [error] [application] Tried to read the folder contents of /Applications/MAMP/htdocs/craft/storage/runtime/assets/tempuploads/field_4/, but could not. 2017/04/24 11:24:10 [error] [application] Tried to read the folder contents of /Applications/MAMP/htdocs/craft/storage/runtime/assets/tempuploads/user_1/field_3/, but could not. 2017/04/24 11:24:10 [error] [application] Tried to read the folder contents of /Applications/MAMP/htdocs/craft/storage/runtime/assets/tempuploads/user_1/field_4/, but could not. 2017/04/24 11:24:10 [error] [application] Tried to read the folder contents of /Applications/MAMP/htdocs/craft/storage/runtime/temp/uploads/userphotos/harry/, but could not. 2017/04/24 11:24:10 [error] [application] Tried to read the folder contents of /Applications/MAMP/htdocs/craft/storage/runtime/temp/uploads/userphotos/remco/, but could not.

2017/04/24 11:24:10 [error] [application] Tried to read the folder contents of /Applications/MAMP/htdocs/craft/storage/runtime/assets/sources/, but could not. 2017/04/24 11:24:10 [error] [application] Tried to read the folder contents of /Applications/MAMP/htdocs/craft/storage/runtime/assets/tempuploads/field_3/, but could not. 2017/04/24 11:24:10 [error] [application] Tried to read the folder contents of /Applications/MAMP/htdocs/craft/storage/runtime/assets/tempuploads/field_4/, but could not. 2017/04/24 11:24:10 [error] [application] Tried to read the folder contents of /Applications/MAMP/htdocs/craft/storage/runtime/assets/tempuploads/user_1/field_3/, but could not. 2017/04/24 11:24:10 [error] [application] Tried to read the folder contents of /Applications/MAMP/htdocs/craft/storage/runtime/assets/tempuploads/user_1/field_4/, but could not. 2017/04/24 11:24:10 [error] [application] Tried to read the folder contents of /Applications/MAMP/htdocs/craft/storage/runtime/temp/uploads/userphotos/harry/, but could not. 2017/04/24 11:24:10 [error] [application] Tried to read the folder contents of /Applications/MAMP/htdocs/craft/storage/runtime/temp/uploads/userphotos/remco/, but could not.

I am trying to load user profile pictures (the craftcms ones), but they don't load. the getPhotoUrl seems to point to the wrong folder(?).

{% set users = craft.users %}
{% for user in users %}
<div class="searchresults"><a href="/profile/{{ user }}">{{ user }}</a>
{% if user.getPhotoUrl %}
<img src="{{ user.getPhotoUrl(64) }}" class="profile_search_picture" alt="{{ entry.user.getFullName }}"/>
{% else %}
<img src="/img/fallback.png" class="profile_search_picture" alt="{{ entry.user.getFullName }}"/> 
{% endif %}
</div>
{% endfor %}

2017/04/24 11:24:10 [error] [application] Tried to read the folder contents of /Applications/MAMP/htdocs/craft/storage/runtime/assets/sources/, but could not. 2017/04/24 11:24:10 [error] [application] Tried to read the folder contents of /Applications/MAMP/htdocs/craft/storage/runtime/assets/tempuploads/field_3/, but could not. 2017/04/24 11:24:10 [error] [application] Tried to read the folder contents of /Applications/MAMP/htdocs/craft/storage/runtime/assets/tempuploads/field_4/, but could not. 2017/04/24 11:24:10 [error] [application] Tried to read the folder contents of /Applications/MAMP/htdocs/craft/storage/runtime/assets/tempuploads/user_1/field_3/, but could not. 2017/04/24 11:24:10 [error] [application] Tried to read the folder contents of /Applications/MAMP/htdocs/craft/storage/runtime/assets/tempuploads/user_1/field_4/, but could not. 2017/04/24 11:24:10 [error] [application] Tried to read the folder contents of /Applications/MAMP/htdocs/craft/storage/runtime/temp/uploads/userphotos/harry/, but could not. 2017/04/24 11:24:10 [error] [application] Tried to read the folder contents of /Applications/MAMP/htdocs/craft/storage/runtime/temp/uploads/userphotos/remco/, but could not.

I am trying to load user profile pictures (the Craft ones), but they don't load. The getPhotoUrl() seems to point to the wrong folder(?).

{% set users = craft.users %} 

{% for user in users %}
    <div class="searchresults"><a href="/profile/{{ user }}">{{ user }}</a> 

    {% if user.getPhotoUrl %}
        <img src="{{ user.getPhotoUrl(64) }}" class="profile_search_picture" alt="{{ entry.user.getFullName }}"/>
    {% else %}
        <img src="/img/fallback.png" class="profile_search_picture" alt="{{ entry.user.getFullName }}"/> 
    {% endif %}
    
</div>
{% endfor %}

2017/04/24 11:24:10 [error] [application] Tried to read the folder contents of /Applications/MAMP/htdocs/craft/storage/runtime/assets/sources/, but could not. 2017/04/24 11:24:10 [error] [application] Tried to read the folder contents of /Applications/MAMP/htdocs/craft/storage/runtime/assets/tempuploads/field_3/, but could not. 2017/04/24 11:24:10 [error] [application] Tried to read the folder contents of /Applications/MAMP/htdocs/craft/storage/runtime/assets/tempuploads/field_4/, but could not. 2017/04/24 11:24:10 [error] [application] Tried to read the folder contents of /Applications/MAMP/htdocs/craft/storage/runtime/assets/tempuploads/user_1/field_3/, but could not. 2017/04/24 11:24:10 [error] [application] Tried to read the folder contents of /Applications/MAMP/htdocs/craft/storage/runtime/assets/tempuploads/user_1/field_4/, but could not. 2017/04/24 11:24:10 [error] [application] Tried to read the folder contents of /Applications/MAMP/htdocs/craft/storage/runtime/temp/uploads/userphotos/harry/, but could not. 2017/04/24 11:24:10 [error] [application] Tried to read the folder contents of /Applications/MAMP/htdocs/craft/storage/runtime/temp/uploads/userphotos/remco/, but could not.

added 187 characters in body
Source Link
Remco
  • 143
  • 6

I am trying to load user profile pictures (the craftcms ones), but they don't load. the getPhotoUrl seems to point to the wrong folder(?).

The profile images seem to be stored in the userprofiles folder by default

{% set users = craft.users %}
{% for user in users %}
<div class="searchresults"><a href="/profile/{{ user }}">{{ user }}</a>
{% if user.getPhotoUrl %}
<img src="{{ user.getPhotoUrl(64) }}" class="profile_search_picture" alt="{{ entry.user.getFullName }}"/>
{% else %}
<img src="/img/fallback.png" class="profile_search_picture" alt="{{ entry.user.getFullName }}"/> 
{% endif %}
</div>
{% endfor %}

2017/04/24 11:24:10 [error] [application] Tried to read the folder contents of /Applications/MAMP/htdocs/craft/storage/runtime/assets/sources/, but could not. 2017/04/24 11:24:10 [error] [application] Tried to read the folder contents of /Applications/MAMP/htdocs/craft/storage/runtime/assets/tempuploads/field_3/, but could not. 2017/04/24 11:24:10 [error] [application] Tried to read the folder contents of /Applications/MAMP/htdocs/craft/storage/runtime/assets/tempuploads/field_4/, but could not. 2017/04/24 11:24:10 [error] [application] Tried to read the folder contents of /Applications/MAMP/htdocs/craft/storage/runtime/assets/tempuploads/user_1/field_3/, but could not. 2017/04/24 11:24:10 [error] [application] Tried to read the folder contents of /Applications/MAMP/htdocs/craft/storage/runtime/assets/tempuploads/user_1/field_4/, but could not. 2017/04/24 11:24:10 [error] [application] Tried to read the folder contents of /Applications/MAMP/htdocs/craft/storage/runtime/temp/uploads/userphotos/harry/, but could not. 2017/04/24 11:24:10 [error] [application] Tried to read the folder contents of /Applications/MAMP/htdocs/craft/storage/runtime/temp/uploads/userphotos/remco/, but could not.


the console gives this error

GET http://localhost/cpresources/userphotos/remco/64/17492405_10212330524487585_7776812525773615973_o.jpg?x=UoEZXg1dH net::ERR_CONNECTION_REFUSED

I am trying to load user profile pictures (the craftcms ones), but they don't load. the getPhotoUrl seems to point to the wrong folder(?).

The profile images seem to be stored in the userprofiles folder by default

{% set users = craft.users %}
{% for user in users %}
<div class="searchresults"><a href="/profile/{{ user }}">{{ user }}</a>
{% if user.getPhotoUrl %}
<img src="{{ user.getPhotoUrl(64) }}" class="profile_search_picture" alt="{{ entry.user.getFullName }}"/>
{% else %}
<img src="/img/fallback.png" class="profile_search_picture" alt="{{ entry.user.getFullName }}"/> 
{% endif %}
</div>
{% endfor %}

2017/04/24 11:24:10 [error] [application] Tried to read the folder contents of /Applications/MAMP/htdocs/craft/storage/runtime/assets/sources/, but could not. 2017/04/24 11:24:10 [error] [application] Tried to read the folder contents of /Applications/MAMP/htdocs/craft/storage/runtime/assets/tempuploads/field_3/, but could not. 2017/04/24 11:24:10 [error] [application] Tried to read the folder contents of /Applications/MAMP/htdocs/craft/storage/runtime/assets/tempuploads/field_4/, but could not. 2017/04/24 11:24:10 [error] [application] Tried to read the folder contents of /Applications/MAMP/htdocs/craft/storage/runtime/assets/tempuploads/user_1/field_3/, but could not. 2017/04/24 11:24:10 [error] [application] Tried to read the folder contents of /Applications/MAMP/htdocs/craft/storage/runtime/assets/tempuploads/user_1/field_4/, but could not. 2017/04/24 11:24:10 [error] [application] Tried to read the folder contents of /Applications/MAMP/htdocs/craft/storage/runtime/temp/uploads/userphotos/harry/, but could not. 2017/04/24 11:24:10 [error] [application] Tried to read the folder contents of /Applications/MAMP/htdocs/craft/storage/runtime/temp/uploads/userphotos/remco/, but could not.


I am trying to load user profile pictures (the craftcms ones), but they don't load. the getPhotoUrl seems to point to the wrong folder(?).

The profile images seem to be stored in the userprofiles folder by default

{% set users = craft.users %}
{% for user in users %}
<div class="searchresults"><a href="/profile/{{ user }}">{{ user }}</a>
{% if user.getPhotoUrl %}
<img src="{{ user.getPhotoUrl(64) }}" class="profile_search_picture" alt="{{ entry.user.getFullName }}"/>
{% else %}
<img src="/img/fallback.png" class="profile_search_picture" alt="{{ entry.user.getFullName }}"/> 
{% endif %}
</div>
{% endfor %}

2017/04/24 11:24:10 [error] [application] Tried to read the folder contents of /Applications/MAMP/htdocs/craft/storage/runtime/assets/sources/, but could not. 2017/04/24 11:24:10 [error] [application] Tried to read the folder contents of /Applications/MAMP/htdocs/craft/storage/runtime/assets/tempuploads/field_3/, but could not. 2017/04/24 11:24:10 [error] [application] Tried to read the folder contents of /Applications/MAMP/htdocs/craft/storage/runtime/assets/tempuploads/field_4/, but could not. 2017/04/24 11:24:10 [error] [application] Tried to read the folder contents of /Applications/MAMP/htdocs/craft/storage/runtime/assets/tempuploads/user_1/field_3/, but could not. 2017/04/24 11:24:10 [error] [application] Tried to read the folder contents of /Applications/MAMP/htdocs/craft/storage/runtime/assets/tempuploads/user_1/field_4/, but could not. 2017/04/24 11:24:10 [error] [application] Tried to read the folder contents of /Applications/MAMP/htdocs/craft/storage/runtime/temp/uploads/userphotos/harry/, but could not. 2017/04/24 11:24:10 [error] [application] Tried to read the folder contents of /Applications/MAMP/htdocs/craft/storage/runtime/temp/uploads/userphotos/remco/, but could not.


the console gives this error

GET http://localhost/cpresources/userphotos/remco/64/17492405_10212330524487585_7776812525773615973_o.jpg?x=UoEZXg1dH net::ERR_CONNECTION_REFUSED
Source Link
Remco
  • 143
  • 6

Why does {{ user.getPhotoUrl(64) }} point towards storage/runtime and not to storage/userprofiles?

I am trying to load user profile pictures (the craftcms ones), but they don't load. the getPhotoUrl seems to point to the wrong folder(?).

The profile images seem to be stored in the userprofiles folder by default

{% set users = craft.users %}
{% for user in users %}
<div class="searchresults"><a href="/profile/{{ user }}">{{ user }}</a>
{% if user.getPhotoUrl %}
<img src="{{ user.getPhotoUrl(64) }}" class="profile_search_picture" alt="{{ entry.user.getFullName }}"/>
{% else %}
<img src="/img/fallback.png" class="profile_search_picture" alt="{{ entry.user.getFullName }}"/> 
{% endif %}
</div>
{% endfor %}

2017/04/24 11:24:10 [error] [application] Tried to read the folder contents of /Applications/MAMP/htdocs/craft/storage/runtime/assets/sources/, but could not. 2017/04/24 11:24:10 [error] [application] Tried to read the folder contents of /Applications/MAMP/htdocs/craft/storage/runtime/assets/tempuploads/field_3/, but could not. 2017/04/24 11:24:10 [error] [application] Tried to read the folder contents of /Applications/MAMP/htdocs/craft/storage/runtime/assets/tempuploads/field_4/, but could not. 2017/04/24 11:24:10 [error] [application] Tried to read the folder contents of /Applications/MAMP/htdocs/craft/storage/runtime/assets/tempuploads/user_1/field_3/, but could not. 2017/04/24 11:24:10 [error] [application] Tried to read the folder contents of /Applications/MAMP/htdocs/craft/storage/runtime/assets/tempuploads/user_1/field_4/, but could not. 2017/04/24 11:24:10 [error] [application] Tried to read the folder contents of /Applications/MAMP/htdocs/craft/storage/runtime/temp/uploads/userphotos/harry/, but could not. 2017/04/24 11:24:10 [error] [application] Tried to read the folder contents of /Applications/MAMP/htdocs/craft/storage/runtime/temp/uploads/userphotos/remco/, but could not.