Despite having tried the tips from Image transforms returning cpresources url, I am still having issues with image-transforms.
I am running Craft Pro 2.5.2754
asset-source details as follows:
Handle: paragraphPictures
Type: Local folder
Path: ./uploads/images/paragraphPictures/
URL: /uploads/images/paragraphPictures/
image-transform details as follows:
Handle: frontpageNewsPicture
Mode: Crop
Crop Position: Center Center
Width: 492
Height: 348
Quality: Auto
Format: png
'generateTransformsBeforePageLoad' => true
is set in craft/config/general.php
folder-permissions as follows:
public/images including all sub-folders and files are owned by apache:apache (the user that runs the apache service) with 777 rights
template-example
{% if entries|length %}
<ul class="entry-list clear">
{% for entry in entries %}
{% set entryUrl = entry.url %}
{% set picture = entry.pictures.first() %}
<li>
<div class="entry-container">
{% if picture %}
{% set picData = craft.norsok.getPicData(picture) %}
{% set maxWidth = picture.getWidth('frontpageNewsPicture') %}
<a class="entry-image" href="{{ entryUrl }}">
<img class="entry-picture"
src="{{ picture.getUrl('frontpageNewsPicture') }}"
style="max-width: {{ maxWidth }}px;"
title="{{ picData['title'] }}"
alt="{{ picData['altText'] }}" />
</a>
{% endif %}
<h3 class="entry-name">
<a href="{{ entryUrl }}">{{ entry.title }}</a>
</h3>
<h4 class="entry-ingress">
<a href="{{ entryUrl }}">{{ entry.ingress }}</a>
</h4>
</div>
</li>
{% endfor %}
</ul>
{% endif %}
this is what the page-source looks like
<img class="entry-picture" src="http://norsok.tibe.no/cpresources/transforms/1?x=bptVEjjgx" style="max-width: 492px;" title="Stengelnematode G Taksdal" alt="En Stengelnematode (Foto: G. Taksdal)">
and this is what my console tells me
GET http://norsok.tibe.no/cpresources/transforms/2?x=bptVEjjgx 500 (Internal Server Error)
GET http://norsok.tibe.no/cpresources/transforms/1?x=bptVEjjgx 500 (Internal Server Error)
the actual images are located here:
http://norsok.tibe.no/uploads/images/paragraphPictures/img-9889-kraftfor-1-foto-anita-land.jpg http://norsok.tibe.no/uploads/images/paragraphPictures/StengelnematodeG.Taksdal.jpg
At this point I am completely baffled and pray to the Stack Exchange-gods for assistance :)
cd
into your /uploads/ folder, can you do als -adl */
to get a listing of the sub directories and their permissions? I would bet the transforms folder (_ frontpageNewsPicture) underneath the asset source isn't writable... – RitterKnight Dec 12 '15 at 19:44[user@server uploads]$ ls -adl */
drwxrwxrwx 2 apache apache 4096 Dec 11 16:12 employeeAttachments/
drwxrwxrwx 5 apache apache 4096 Dec 11 13:34 images/
[user@server uploads]$
apache is the user that runs the webserver :) – Fuglsetrampen Dec 13 '15 at 20:35paragraphPictures
and a transforms folder, after Craft creates the transforms. If you dochmod -R 755 . && chown -R apache:apache .
on your uploads folder that should give permissions all the way down. If you're not already running as a superuser, addsudo
to both commands. – RitterKnight Dec 13 '15 at 21:25uploads
like you asked for won't show you nested sub-folders ? As stated in the original question, public/images including all sub-folders and files are owned by apache:apache (the user that runs the apache service) with 777 rights – Fuglsetrampen Dec 14 '15 at 7:44ls -arl */
but regardless, just wanted to confirm you had set them properly. It's pretty common in troubleshooting to never assume someone actually did something properly until proven otherwise. – RitterKnight Dec 14 '15 at 15:54