Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support schmidt25

    (@schmidt25)

    Hi Rafał,

    Thanks for opening this thread.

    WordPress handles the limits for uploads and not Advanced Ads. So you can decrease the maximal file size globally, but this limit would affect all actions, including uploading images for your content. Here, you can find a post that describes several options to set these limits.

    Suppose you want to avoid that the ad managers on your website can upload images with heavy file sizes, but in addition, you don’t want to limit the file sizes of your content images. For this purpose, please check this section of the post, in which the author shows an example of how to limit the file sizes for specific user roles.

    I hope that you can resolve your issue with this idea.

    Best regards,
    Joachim

    Thread Starter Rafał

    (@ayek)

    Hi Joachim,

    Thank you for your assistance. (I didn’t receive an email on your replay, as usually, that’s why my delayed answer).

    No chances to set a filter eg. wp_handle_upload_prefilter to check if current post type is advanced_ads (i believe), then don’t pass too heavy image?

    Best regards!

    Plugin Support schmidt25

    (@schmidt25)

    Hi @ayek,

    Thanks for your reply.

    Since the image upload is not necessarily connected to the post type, I don’t think media filters will be of much help. E.g., an image can be uploaded to the media library and then selected in the post type. I am not aware of any way that will make this work.

    I think managing the upload limits via the user roles would be the solution that matches your request most.

    Best regards,
    Joachim

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘File size restriction for single image’ is closed to new replies.