Support » Plugin: Media Library Assistant » change image size in gallery

  • Resolved ellabtz

    (@ellabtz)


    Hi David!

    Hope you had a great vacation!

    I would like to change the image size of my imported gallery, the thumbnail size is too small. I read in the documentation that you can define a new size with ‘add_image_size()’, but where exactly do I have to insert that? Or is there any other way to change this?

    Thanks a lot!
    Regards.

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Author David Lingren

    (@dglingren)

    Thanks for the good wishes and your question. I am still on the road but wanted to give you a preliminary response.

    The add_image_size() function directs WordPress to generate and store an additional image size when items are uploaded to the Media Library. WordPress already generates several sizes such as thumbnail, medium, large and full. Themes often add additional choices. You can probably find a way to use one of the existing sizes to accomplish your goal.

    The solution depends on how you create the gallery display. The [mla_gallery] shortcode has a size= parameter, for example. It looks like you are using a theme function or shortcode for your gallery. The documentation for that function/shortcode is the best place to start. If you can be more specific about how the gallery is generated I might be more helpful.

    Thread Starter ellabtz

    (@ellabtz)

    Hi david,
    thank you for your quick reply! 🙂

    I use the Theme Enfold Child, I add a textbox on my page and enter the shortcode there [mla_gallery attachment_category=’vacation’].

    I tried to use the size parameter, but unfortunately the size doesn’t change, no matter if I specify small, large or extra_large for example, it just gets a little smaller. The largest is the size thumbnail, but unfortunately that’s too small for me …
    This is the shortcode I used:
    [mla_gallery attachment_category=’wohnwagen’ size=large]
    Can you help me further?
    Thank you!!

    Plugin Author David Lingren

    (@dglingren)

    Thanks for your update with the additional information. The most likely cause of your issue is that the theme is applying HTML markup and CSS styles that are constraining the size of your gallery display. I found this theme, which I believe is the one you are using:

    Enfold – Responsive Multi-Purpose Theme

    This is a premium theme and I hope you will understand that I cannot afford to purchase themes and plugins simply to support my own free plugin.

    If you can post a link to the page on which the gallery appears I can investigate further. You can also try adding columns=1 to your shortcode just to see if a larger image appears.

    Thread Starter ellabtz

    (@ellabtz)

    I have added columns=1, but unfortunately this doesn’t change the size. This is the page where the gallery is inserted: https://www.reisebuero-bamberg.de/portfolio-test/
    But I will contact the support of Enfold.

    Thank you David! 🙂

    Plugin Author David Lingren

    (@dglingren)

    Thanks for trying the columns parameter and for posting a link to your page.

    The gallery on your page is currently set to size=thumbnail, the default value. Can you try changing it to size=medium or size=large as listed in your earlier post?

    Thanks for your help.

    David
    I am also having a similar issue. Here is the test page: https://jonswebsite-8943e5.ingress-erytho.easywp.com/gallery-basic

    The shortcode I am using is:
    [mla_gallery attachment_category=feed columns=1 size=”large”]

    I have tried size=”full” as well, no difference.
    Thanks!

    may have partially solved it. the shortcode was in a paragraph block not a shortcode block. still playing with it. size=full now makes the images bigger but no where near their full size.

    changed themes and now i get the fullsize images, all is good. off to find a decent theme now…

    Plugin Author David Lingren

    (@dglingren)

    @bujinkantd – Thanks for adding to the topic your notes on the problem and the solution you worked to find. Best of luck on finding a theme that suits your application.

    @ellabtz – I hope we can find a similar solution for you. The note on changing the block type is interesting and may be something you can try. As I wrote earlier, if you can changing your gallery to size=medium, size=large or size=full I can investigate further.

    Thread Starter ellabtz

    (@ellabtz)

    Hi David,

    i just added size=large and size=full, but as you can see both just makes the images smaller and both have the same size. also changed the block type, unfortunately still doesn’t work.
    I will try to solve it with adding CSS-code now, will give you an update if it works

    Plugin Author David Lingren

    (@dglingren)

    Thanks for your update and for updating the test gallery page to try a “code” block and the larger size values.

    I had a look at the two galleries on the page and discovered that CSS styles are at least part of the problem. In particular this stylesheet is involved:

    https://www.reisebuero-bamberg.de/wp-content/uploads/dynamic_avia/avia-merged-styles-a48e7d573e985fa9e1d64c2136ed65bb---60a65c41563ee.css
    

    It contains this style:

    .gallery-item{margin:1px 1px 0 0;width:80px;height:80px;padding:0}
    

    The style limits the size of each gallery thumbnail and accounts for the results you are getting.

    The [mla_gallery] shortcode mimics the class names set by the WordPress [gallery] shortcode to make it easier for themes to enforce a uniform style throughout the site. This is not working for your application.

    You can modify the styles in your theme or you can use MLA’s custom style and markup templates to separate the [mla_gallery] results from the default WordPress results.

    Let me know how your CSS-code investigations go and if you need more specific guidance. Thanks for your persistence!

    Thread Starter ellabtz

    (@ellabtz)

    Many thanks for your efforts!!
    I have inserted this code in CSS, now my images are larger! 🙂

    #top .gallery .gallery-item, #top .gallery .gallery-item img  {
        width: 130px;
        height: 130px;
        margin: 0px 5px 0 0;
    }
    

    But now I have the problem that the image quality is very poor when I display the images even larger.
    Now I have thought to display the images on click in full size and then redirect to the parent-page. Is that possible?
    Right now I’m using the shortcode:

    
    [mla_gallery attachment_category='bar' mla_link_href='{+site_url+}/?page_id={+parent+}']
    

    But with this you are redirected directly.

    Thank you!

    • This reply was modified 1 year, 6 months ago by ellabtz.
    • This reply was modified 1 year, 6 months ago by ellabtz.
    Thread Starter ellabtz

    (@ellabtz)

    Fixed the problem with the bad quality by adding size=full in the shortcode! 🙂

    Plugin Author David Lingren

    (@dglingren)

    Thanks for both of your updates with the good news on your progress.

    You wrote “Now I have thought to display the images on click in full size and then redirect to the parent-page. Is that possible?” I understand that to mean you want to display the full size image and then click on the image to display the parent post; is that right?

    You can experiment with a two-step solution. For the first step display the gallery as you do now and change the mla_link_href to return to the page (or go to a separate page) with the selected image ID. Here are shortcodes you can adapt:

    [mla_gallery post_mime_type="{+template:{+request:selected_image_id+}|image+}" attachment_category=bar mla_link_href='{+page_url+}?selected_image_id={+attachment_ID+}' ]
    
    [mla_gallery ids="{+template:{+request:selected_image_id+}|1+}" columns=1 size=full mla_link_href='{+site_url+}/?page_id={+parent+}' ]
    

    The first shortcode displays the gallery with the revised links. The ‘post_mime_type=parameter is a trick to suppress this gallery when theselected_image_idis present in the URL. The second shortcode displays the full size image and links to the parent post/page. The second value ("1") in theids=parameter is a trick to suppress this gallery when theselected_image_id` is missing from the URL.

    You may find adding a separate page for the full size display works better for you, but the above suggestion should get you started. Let me know if that’s helpful and how it works out.

    Plugin Author David Lingren

    (@dglingren)

    It has been a month since the last post in this topic. I assume you have found a solution that works for your application.

    I am marking this topic resolved, but please update it if you are still having trouble with displaying the full size image.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘change image size in gallery’ is closed to new replies.