Support » Plugin: Easy Watermark » Watermarking on frontend uploads

  • I have a frontend form created with the CRED plugin that creates posts and sets featured image from a file upload field. The images uploaded through this form do not get auto-watermarked even though I enabled the option of auto-watermarking.

    Backend uploads still work fine. Does this plugin support frontend uploads?

    http://wordpress.org/plugins/easy-watermark/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author szaleq

    (@szaleq)

    Hello Hassan,

    Sorry for this long time of silence. Easy Watermark does not distinguish front or backend upload, it is just plugged into some hook which is used in wp_insert_attachment() function. If the CRED plugin does the upload in a “wordpress way” using wordpress functions, it should work. But maybe it has some other functions… I’ll try to check what’s wrong.

    I’ve asked the CRED devs and they said their plugin does use the “wordpress way”. They said they’re using the wp_handle_upload function. Here’s the exact code snippet that’s responsible for this.

    Plugin Author szaleq

    (@szaleq)

    Ok, I have looked into the code, and created an account on CRED testing sites. Here is what I found: the plugin uploads the file ‘wordpress way’ but does not insert the file as a wordpress ‘attachment’ (files uploaded on frontend are not listed in wordpress media library) so the wp_insert_attachment function is not called and Easy Watermark doesn’t know the file was uploaded. There is no solution for this at the moment since it needs a lot of additional coding to handle this. Maybe it’s a suggestion to CRED developers, they should insert wordpress attachment also, instead of just uploading the file…?

    Regards

    Hmmm… I don’t know about this, I actually see the uploaded images under my Media Library. Not sure why these images still don’t get watermarked.

    Oops, spoke too soon. You’re correct; CRED does not create attachments. I’ll talk with them about this. Thanks for the help!

    Ok, I feel a bit stupid here. The uploaded images actually DO appear in the Media Library in the backend (I’m not sure how I missed seeing them :S), which means CRED does create attachments. I also just confirmed this with CRED devs as well.

    Any idea why watermarks are still not applying? Maybe CRED is creating the attachments after your code executes? Just a thought..

    Plugin Author szaleq

    (@szaleq)

    Hi,

    The code which does the watermarking action is actually plugged into the wordpress function which creates the attachment (wp_generate_attachment_metadata), so it must be executed if the function is called.

    I don’t have a time for a deeper search currently, but if I have some, I’ll try to figure it out. Maybe you could send me (email) the code of CRED you are using? (Just for testing purpose, since I can’t see everything on their free trial site)

    Hmmm… I’m not really sure now why it isn’t applying either.

    I have this shortcode in my CRED form builder page:
    [cred_field field="_featured_image"]
    ..which renders the file upload field on the frontend and creates the featured image of the post from it.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Watermarking on frontend uploads’ is closed to new replies.