WordPress.org

Ready to get started?Download WordPress

Forums

Dynamic Image Resizer
[resolved] plugin block my way (3 posts)

  1. ppserver
    Member
    Posted 1 year ago #

    hi author.
    this plugin is amazing and works great but after i active it i cant upload another file formats anymore.
    for example when i try to upload a PDF file my uploading process bar still working for ever and i must refresh the page to see my new uploaded file.
    i cant remove plugin because i really need it and i'm search for a way to except other formats in plugin base.
    can you help me please?
    i just want a simple exception in plugin file to not make tribulation with another file formats.
    regards

    http://wordpress.org/extend/plugins/dynamic-image-resizer/

  2. ppserver
    Member
    Posted 1 year ago #

    problem solved!

    at the line 60:

    add_filter('wp_generate_attachment_metadata','dynimg_generate_metadata');

    we should remove 'wp_generate_attachment_metadata' because generated attachment doesn't need WP trick. actually we should just do WP trick on our images not all attachments.

  3. JochenT
    Member
    Posted 1 year ago #

    Your error analysis is wrong. I've uploaded hundreds of PDF with this plugin active and there is no additional attachment meta data. You may check this directly in your database using the following SQL statement:

    SELECT * FROM wp_postmeta
      WHERE meta_key = '_wp_attachment_metadata'
        AND meta_value LIKE '%.pdf%'

    (replace table prefix wp_ with the prefix you use)
    The result should be empty. You may change pdf to jpg or png and you should get a lot of rows as result.

    The global variable $dynimg_image_sizes which is used in function dynimg_generate_metadata() should be empty if it is not an image. This behaviour relies on WP not the plugin.

    Thus, if you do find any rows with PDF files in the database this is due to an error / misconfiguration somewhere else.

    You may also see at function wp_generate_attachment_metadata() in file wp-admin/includes/image.php, which applies both filter hooks 'intermediate_image_sizes_advanced' and 'wp_generate_attachment_metadata'.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic