output full image for file upload thumbnail

Support General output full image for file upload thumbnailResolved

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #49713
    aryanrajaryanraj
    Participant

    Hi, I am using File Upload field and it shows thumbnail for pds. https://docs.metabox.io/fields/file-upload/

    it currently seems to output thumbnail size and not full size in preview. I am disabling the thumbnail in Settings > Media and the thumbnail not display after it. How can i change it to full? i don't want to use different size of images for pdf. one is enough.

    #49714
    aryanrajaryanraj
    Participant

    thumbnail for pdfs. unchecking the media thumbnails shows this SVG /wp-includes/images/media/document.svg. i want to use the default filename-pdf.jpg without the cropped/thumbnail version.

    #49718
    PeterPeter
    Moderator

    Hello,

    If you upload the PDF file, it isn't an image, so it doesn't have a thumbnail image. Only the default icon from WordPress displays after uploading the PDF file wp-includes/images/media/document.svg

    Meta Box uses the WordPress function wp_get_attachment_image() to display the thumbnail image for the uploaded file

    'icon' => wp_get_attachment_image( $file, [ 48, 64 ], true ),

    Please follow WordPress documentation https://developer.wordpress.org/reference/functions/wp_get_attachment_image/

    #49720
    aryanrajaryanraj
    Participant

    No, WordPress automatically generate a thumbnail image from the first page of a PDF filename-pdf.jpg

    This includes FULL and other sizes. Metabox File Upload field shows attachment preview thumbnail but the Thumbnail size it takes from /wp-admin/options-media.php

    My issue is i have disabled the other sizes generation so it only create one preview without cropping for thumbnail. Metabox doesn't seems to respect the default preview file and revert the svg icon.

    If you upload a pdf in Library, you can check the preview and generated sizes via FTP/SFTP. I am looking for a way to show default preview jpg file and not thumbnail size.

    #49730
    aryanrajaryanraj
    Participant

    the issue is from WordPress media function so you can close it.

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