FilePicker preview image? Topic is solved

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
10010110
Translator
Translator
Posts: 217
Joined: Tue Jan 22, 2008 9:57 am

FilePicker preview image?

Post by 10010110 »

Is there a way to show a preview image in the filepicker block like JMFilePicker (or GBFilePicker before that) used to do?
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1632
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: FilePicker preview image?

Post by DIGI3 »

It does by default, but only if it has a thumbnail file (usually generated if uploaded via filepicker or file manager). If you uploaded it through your OS, for example, you'll need to trigger the generation one at a time in File Picker (I'm hoping for a bulk solution at some point).
Not getting the answer you need? CMSMS support options
10010110
Translator
Translator
Posts: 217
Joined: Tue Jan 22, 2008 9:57 am

Re: FilePicker preview image?

Post by 10010110 »

Thanks. I hope we’re not misunderstanding us here. What I mean is in the page edit screen, I want a preview image shown in addition to the text field that shows the file name.
Also, I don’t see a way to trigger the generation of a thumbnail file in FilePicker.
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1632
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: FilePicker preview image?

Post by DIGI3 »

I'm not entirely sure what you want, maybe a screenshot would help?

The thumbnail generation is in File Manager, not File Picker.
Not getting the answer you need? CMSMS support options
10010110
Translator
Translator
Posts: 217
Joined: Tue Jan 22, 2008 9:57 am

Re: FilePicker preview image?

Post by 10010110 »

I mean this type of input:

Code: Select all

{content_module assign='hero_image' label='Hero image' block='filepicker_block' module='FilePicker' type='image' profile="Standard" scope="global"}
This shows up in the page edit screen in admin as input field where I can select an image. After selecting the image, the file path is shown in the input. I’d like to have the image itself shown there, too.
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1632
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: FilePicker preview image?

Post by DIGI3 »

Ah, gotcha. I don't think that would be possible without creating your own admin template. You might want to look at ECB2 though, it has a file_picker field that includes a thumbnail, among many other options that greatly expand the default fields available.
Not getting the answer you need? CMSMS support options
10010110
Translator
Translator
Posts: 217
Joined: Tue Jan 22, 2008 9:57 am

Re: FilePicker preview image?

Post by 10010110 »

Thanks, ECB2 looks very useful and exactly like what I need.
But (and this shifts the subject a bit but hopefully can be answered quickly) if I add type='image' to the content module tag it reverts to a standard text input. Am I missing something?
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1632
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: FilePicker preview image?

Post by DIGI3 »

This is with ECB2 installed? I haven't run into that, but make sure you're adding all of the required parameters e.g.

Code: Select all

{content_module module=ECB2 field=file_picker block=test type=image}
If you can recreate it then you should file a bug report on the module's forge page, Chris is usually pretty quick to fix things if you can provide steps to reproduce.
Not getting the answer you need? CMSMS support options
pierrepercee
Forum Members
Forum Members
Posts: 153
Joined: Thu Jan 10, 2013 8:02 am

Re: FilePicker preview image?

Post by pierrepercee »

DIGI3 wrote: Thu Apr 18, 2024 1:30 pm I'm hoping for a bulk solution at some point
Hello Digi 3,

I think many of us have been waiting for this little improvement for a long time.

As the latest version of CMSMS is a bit late, perhaps it would be time to talk about it?
Note the generation of thumbnails can consume a lot of resources on the server side if the photos are large, you should proceed by calculating the size in MB of the images to be processed then divide into small series to start the generation so as not to load too much the server.
Post Reply

Return to “CMSMS Core”