While serving images through CakePHP, I’m getting
The image
“http://DOMAIN/PLUGIN/images/image.png”
cannot be displayed, because it
contains errors.
There is a bug report already existing, http://cakephp.lighthouseapp.com/projects/42648-cakephp/tickets/864
As mentioned in the above bug report, whitespace is the culprit here. Can someone throw some light upon where exactly I have to look for these white spaces? I’ve checked at the end of all my files, there are no white spaces. So where else should I be checking for these white spaces?
Thanks in advance for your time.
I’ve solved this problem by creating a symlink from my plugin webroot to app/webroot… Though not an ideal solution, this is more forgiving with accidental white spaces which are very difficult to find.
A side effect advantage to this solution is that according to http://book.cakephp.org/view/1093/Themes, serving plug-in assets directly from webroot is much faster than serving them through CakePHP’s dispatcher.
Thanks everyone for your time.