$imageURL is not available on membership contribution confirmation and thank you pages
This was originally posted here: https://issues.civicrm.org/jira/browse/CRM-19983 in 2017 but I am not finding any indication that it was ever resolved, or this is a regression, not sure.
If you include the contact photo field (image_url) in a profile on a membership contribution form and a user uses the field, the image is uploaded, however the image preview (thumbnail with option to delete) fails to display on the confirmation and thank you pages. This causes the users confusion because the field to upload an image appears in its place which leads the individuals to re-try uploading their image (which will cause their image to not be saved). It also fails to appear on the thank you page if you do not enable the confirmation page option.
If you include the smarty debug tag in templates/CRM/UF/Form/Fields.tpl where you'd expect the image to be output, you'll see that $imageURL is not defined.
If you use the same field on a standalone profile form, the preview does display on the last page (there is no confirmation page in this case), so it does appear to be limited to when the profile is included on a contribution form.
What we should see: (1) no upload field on confirmation or thank you pages, (2) include a preview of an image if one was uploaded.