Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

Thumbnail size in admin

default discord avatar
frederichoulelast year
17

Hey guys! Is there any way to increase the thumbnail size in the Media collection, and also in the Media chooser from within a richtext field. I know about the

adminThumbnail

setting, but it doesn't increase the size the thumbnail is shown when selecting files.

  • default discord avatar
    zed0547last year

    Hey

    @1019985820033224704



    The easiest would be to just modify the

    custom.scss

    in the (payload) folder by targeting those thumbnail styles to be larger

  • default discord avatar
    frederichoulelast year

    Hey

    @654031862146007055

    thanks!



    It looks like some other sizes already exists in the CSS. Is there any way to use them?



    If not i'll just override in custom.scss but I was wondering.

  • default discord avatar
    zed0547last year

    It's not about the sizes that are generated - those are meant as variations for

    you

    to use on your own frontend. By default, the admin panel uses either your adminThumbnail or the smallest size larger than 40px. However, the actual image gets rendered at 40px so it wouldn't matter anyway since it's restricted based on css.

  • default discord avatar
    frederichoulelast year

    Ok perfect. Thanks!



    I have 2 other questions, should I open a new thread for them?

  • default discord avatar
    zed0547last year

    We can walk through them here

  • default discord avatar
    frederichoulelast year

    Is there any way to add multiple medias to an article (in the lexical editor), instead of adding them one by one.



    like a few checkboxes we could click, and it adds all the medias

  • default discord avatar
    zed0547last year

    Ah, not with the default built-in features, you'd have to author a custom lexical feature for that I think

  • default discord avatar
    zed0547last year

    You can do that for regular media uploads, but specifically for Lexical it's one by one for now



    The above is for document views, but what I understand is that you want to do this in a lexical editor field

  • default discord avatar
    frederichoulelast year

    yeah exactly. I would like to open the Media drawer from Lexical, select 4 pictures, save, and it will add all 4 to my article



    our articles are often with 15-20 pictures, so our writers are having a hard time (and long time) doing it one by one.

  • default discord avatar
    zed0547last year

    Best bet would be a custom lexical feature I think, you can use the existing one as a guide/inspo as the functionality would be similar

  • default discord avatar
    frederichoulelast year

    perfect thanks

  • default discord avatar
    zed0547last year

    My pleasure

  • default discord avatar
    frederichoulelast year

    One last question!



    https://payloadcms.com/docs/configuration/collections#list-searchable-fields

    Just to 100% confirm, shoudl I index the fields myself, or will Payload do it in the schema directly?

  • default discord avatar
    zed0547last year

    You should add

    index: true

    do your fields



    And Payload handles the rest

  • default discord avatar
    frederichoulelast year

    ok great



    Thanks!



    We're migrating a network of 13 websites, 20 writers to Payload, so far it's going well.

  • default discord avatar
    zed0547last year

    Super happy to hear that! Payload has become my favourite tool by far



    There's so much you can do with it, it's such a joy to work with



    Let me know if you have any other questions!

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team.