I've seen several tickets about this issue, but not sure I have a clear answer. I'm using an image upload field on a CRED form and I do not want to give users access to the WP Media Uploader. As of now, it looks like my only options for displaying the uploaded image in the form are "filename" and "complete URL".
If we can return the full URL of the image, is there some reason I can't display the image itself? If there's not a built-in setting, is there a hook in the API I can use to rewrite the output of the preview?
Keep in mind I'm not looking for AJAX functionality. I just want to show a thumbnail of an image that's already been uploaded. Thanks!
Thank you for getting in touch. Basically what you are trying to achieve isn't possible unless you use the Media uploader for wordpress.
This is because with the classic php upload method the image isn't uploaded until the form has been submitted, so even if a URL is being generated the image isn't actually uploaded to the site as yet so you're not able to get the thumbnail for the image.
Thanks Shane – I understand that and should have been more specific. I'm using a Post Edit form, so the image has already been uploaded. I'm trying to allow a user to see what the existing image is before deciding to change it.
Hi Shane – Totally my fault. I had seen the option for "As an image HTML tag" in screenshots on other threads, but didn't have it available on my site. I figured maybe that was an old feature. Turns out I was working with a "File" field as opposed to an "Image" field. Sorry for the bonehead mistake and thanks for your help!