Skip Navigation

[Resolved] Show Image Preview After Upload in CRED

This thread is resolved. Here is a description of the problem and solution.

Problem:

I have a user profile CRED form (create & edit) that allows for a profile image upload. I want to show a preview of it after upload.

I only want them to be able to upload from their computer.

Solution:

You can try the CSS workaround in below post:

https://toolset.com/forums/topic/show-image-preview-after-upload-in-cred/#post-1607967

Or other plugin for example:

https://wordpress.org/plugins/wp-users-media/

Relevant Documentation:

This support ticket is created 4 years, 7 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Our next available supporter will start replying to tickets in about 1.33 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 4 replies, has 2 voices.

Last updated by davidN-5 4 years, 7 months ago.

Assisted by: Luo Yang.

Author
Posts
#1607539

Tell us what you are trying to do? I have a user profile CRED form (create & edit) that allows for a profile image upload. I want to show a preview of it after upload. I know that solve this if I choose the option to "Use the WordPress Media Library manager for image, video, audio, or file fields," however, I this gives users access to the entire media library which I do not want. I only want them to be able to upload from their computer.

#1607967

Hello,

There isn't such kind of built-in feature within Toolset Forms plugin, you can try to hide the "Media Library" tab with CSS codes, for example, edit the " user profile CRED form" you mentioned above,
1) Enable option " Use the WordPress Media Library manager for image, video, audio, or file fields"

2) click "CSS Editor", add below CSS codes:

#menu-item-browse, div[aria-labelledby="menu-item-browse"]{display: none}
#1608445

Thanks for the suggestion Luo. But won't this hide it for all users including admins?

#1608559

I did find this plugin which seems to be a good solution: https://wordpress.org/plugins/wp-users-media/

It allows you to segment media libraries by user role.

#1608563

My issue is resolved now. Thank you!