Troubleshooting

URLs vs. Paths

The first thing you need to understand when working with PHP and images is this: PHP uses server paths (for example: /var/www/example/domain/public/), not URLs (like http://www.example.com). CE Image tries to blend the two to make life easier. This is what makes CE Image work out-of-the-box for most people. However, there are times when you may need to adjust some settings to get things to work for your specific setup.

Debugging

If you are having any trouble getting the plugin to work, you need to enable ExpressionEngine®’s Template Debugging. If you don’t do that, then you don’t really want to solve your issue. Seriously, do it! :)

Enabling Template Debugging for EE3

In EE3, you can enable template debugging in the Control Panel by going to System Settings->Debugging & Output->Enable debugging?->Enable.

Meet The Template Debugger

Now refresh your front-end page and scroll down. You will see debugger box with different tabs. Click on the Templates tab, and you'll see the template output. You have just met the template debugger! The template debugger is awesome, because it shows you what is happening on the page, and how long things are taking. It’s a very important tool for getting your site to run smoothly.

You will want to do a quick search on the page for CE Image debug. The plugin logs some detailed info about what’s going on, and you will be able to tell what problems, if any, it encounters.

Debugger Example

In this example, we are going to add a CE Image single tag to a blank template, and pass in a source image that doesn't exist:

<!-- Note that the source image doesn't exist -->
{exp:ce_img:single src="/images/missing.jpg" width="100"}

In the debugger, we will see information about this tag's processing. This is a good place to see exactly the way EE is receiving your tag:

0.091140 / 2.17MB    Calling Tag: {exp:ce_img:single src="/images/missing.jpg" width="100"}
0.097430 / 2.18MB    Calling Extension Class/Method: Ce_img_aws_ext/update_valid_params
0.124603 / 2.30MB      ***  CE Image debug: Base path: '/your/current/document/root/'
0.124647 / 2.30MB      ***  CE Image debug: Source image: '/images/missing.jpg', Fallback image: ''
0.124679 / 2.30MB      ***  CE Image debug: Source image is not readable or does not exist: '/images/missing.jpg'.
0.124708 / 2.30MB      ***  CE Image debug: Fallback source image is not readable or does not exist: ''.
0.124765 / 2.29MB    Returning No Results Content
0.124868 / 2.29MB    -> Data Returned

The above means that CE Image looked for your image at /your/current/document/root/images/missing.jpg (the “base path” plus the relative path), but it wasn’t there (or was not readable)!