Image Picker sort by date


#1

If we have approximately 200 images (or more) in a given folder, is it possible to sort images by upload date in image pickers?

Our authors are concerned that it is hard to upload a new image, then find it in the list of images.

Alternately, it would be an improved user experience for the picker to automatically select an image that has just been uploaded via the picker…


"lastModified" column in Document Pickers
#2

When I open an image folder, I can switch the view to “List view” from “Icon view” and click on “Last modified” field to sort by that. Is it what you’re looking for?


#3

I don’t see a “last modified” column in the list view for the image picker. Showing an image picker from the demo author at https://cms.demo.onehippo.com/?1


#4

I thought about image folder view, not the gallery link picker. Hmm. It’s showing Name column only by default, unfortunately.
After a brief look, I see the following configuration at /hippo:configuration/hippo:frontend/cms/cms-folder-views/hippogallery:stdImageGallery/defaultColumns:

  • plugin.class: “org.hippoecm.frontend.plugins.gallery.columns.ImageGalleryColumnProviderPlugin”

And the plugin class has the following implementation:

    public List<ListColumn<Node>> getColumns() {
        final List<ListColumn<Node>> columns = new ArrayList<>();
        columns.add(createIconColumn());
        columns.add(NAME_COLUMN);
        return columns;
    }

Perhaps you can implement a custom one extending it like the following:

    // org.example.cms.plugin.MyImageGalleryColumnProviderPlugin
    @Override
    public List<ListColumn<Node>> getColumns() {
        final List<ListColumn<Node>> columns = super.getColumns();
        // you can also filter out something based on ListColumn#getSortProperty().
        columns.addAll(getExpandedColumns());
        return columns;
    }

Then it will possibly show width, height, mimeType, size and lastModified columns in list view.

Regards,

Woonsan


#5

Well, this is the author’s and editors forum, so basically the answer is you can’t at this moment. Woonsan’s solution may work, but that is more something for the developer side. I suggest filing an improvement request in Jira.