[Resolved] Mediapress upload and Image optimisation

  • Participant
    Level: Master
    Posts: 163
    Audiomonk on #16654


    Me again (sorry)..

    I’ve been working with the team at Shortpixel (image optimisation) their service optimises an image once it’s uploaded by a user. We’ve hit a problem in that when Mediapress items are uploaded, they don’t get optimised after upload.

    “problem is that the gallery uploader appears not to be firing the usual actions when an image gets uploaded: ‘wp_handle_upload’ and ‘wp_generate_attachment_metadata’. ”

    I wonder if you have any thoughts on how I can maybe fix this in Mediapress?

  • Keymaster
    (BuddyDev Team)
    Posts: 19859
    Brajesh Singh on #16655

    Hi Audiomonk,
    Thank you for posting and there is no need to apologise. Please feel free to ask/post any question.

    Yes, It is correct that we do not fire ‘wp_handle_upload’ and ‘wp_generate_attachment_metadata’. It was intentional to avoid 3rd party plugins changing our path or generating extra files.

    The user uploaded files are different from the normal uploads. These don’t need to be generated in so many sizes.

    If we kept these two, there would have been great many conflicts with 3rd part plugins.

    It is very easy to make any optimization plugin work with MediaPress.

    All a plugin need to do is attach the same callback to MediaPress filters


    what they have attached to ‘wp_generate_attachment_metadata’ and ‘wp_handle_upload’ respectively.


  • Participant
    Level: Master
    Posts: 163
    Audiomonk on #16671

    Thank you Brajesh for this and for all the support you give, you are the best and a real example of what good, friendly and helpful support is.


  • Keymaster
    (BuddyDev Team)
    Posts: 19859
    Brajesh Singh on #16674

    Thank you for the kind words and the cup 😀

The topic ‘ [Resolved] Mediapress upload and Image optimisation’ is closed to new replies.

This topic is: resolved