• Resolved tonyuk

    (@tonycsanders)


    I am not getting Thumbnail substitutions using mla_viewer on my host (Bluehost). Bluehost have ImageMagick and Ghostscript installed.

    Active editor
    WP_Image_Editor_Imagick

    ImageMagick version number
    1693
    Ghostscript version
    9.54.0

    I just want to check this sortcode is correct and there is nothing else I am missing.

    [mla_gallery post_mime_type=application/pdf attachment_category=gazettes link=file mla_viewer=true mla_viewer_width=300 orderby=title order=DESC columns=4]

    The thumbnails displayed by this shortcode are the “native thumbnail images” WordPress generates ….pdf-106x150.jpg, ….pdf-212x300.jpg etc. but if I manually delete these .jpgs for a particular .pdf then a substitute generated by ImageMagick/Ghostscript doesn’t get displayed - a blank image is displayed instead – the blank image link is https://i0.wp.com/mydomain.com/wp-content/uploads/Gazettes/2018-May-pdf.jpg?resize=111%2C150&ssl=1)

    Debug log shows:.

    [05-Feb-2025 10:04:56] 56 MLAShortcode_Support::mla_ghostscript_present(? ) explicit_path = ''

    [05-Feb-2025 10:04:56] 57 MLAShortcode_Support::mla_ghostscript_present(? ) ghostscript_present = NULL

    [05-Feb-2025 10:04:56] 130 <strong>MLAShortcode_Support::mla_ghostscript_present</strong>, exec(which gs) = '/usr/bin/gs'

    I am thinking my ghostscript path may not be '/usr/bin/gs' ?
Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter tonyuk

    (@tonycsanders)

    I chatted with my host (Bluehost) – I have a Shared server subscription – no root access.

    Path /usr/bin/gs requires root access (VPS/Dedicated server only) – hey ho.

    size=full and then scaling down with mla_itemwidth=15% gives me what I need – unless there is a more elegant way ?

    Plugin Author David Lingren

    (@dglingren)

    Thanks for your questions and for including configuration details and the log excerpt; very helpful.

    The mla_viewer parameters are a holdover from very old WordPress versions and won’t help you much. Since you have WordPress native PDF thumbnails available you can use any of the intermediate sizes as alternatives to size=full. The Settings/Media admin page will show you the sizes you have available. On my system, the “Medium” size can be used to get images 300 pixels high. The images are proportional, so the width is 212 pixels. You can alter the dimensions or define additional intermediate sizes to get other dimensions. If you make changes, you can use the Thumbnail bulk action on the Media/Assistant admin screen to regenerate the thumbnails reflecting the changes.

    For an easy fix, try size=medium and omitting the mla_itemwidth parameter.

    Thread Starter tonyuk

    (@tonycsanders)

    Many thanks David size=medium and omitting the mla_itemwidth parameter works nicely. Also I had not noticed the options on the Settings/Media admin page – so now I have lots of flexibility to achieve what I need.

    Case closed with thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.