I have hit a problem concerning the file system location of page header images. Currently, the page header addon assumes them to be at document_root + relative http path. This is not a safe assumption, since there might be web server rewrites in play. In our case, the WordPress files are located in a sub directory, but are transparently rewritten to / by nginx. The current assumption causes the resizing / crop routine to fail (the files are not found, since the image editor looks for them in /wp-content/… instead of /wordpress/wp-content/…).
A better approach might be to handle internal WordPress attachments and other, url-based image references differently. Attachments should be referenced by their attachment id, since WordPress already knows their file system location. No guess work needed. 😉 It can be retrieved using get_attached_file($id). This should also work for multisite.
The attachment id is readily available via the wp.media api (attachment.id), so I would be glad if you could take a shot at fixing this issue.
Thanks,
Jan Ortgies
– MdA Fabio Reinhardt –