BuddyDev

Search

Max Image resolution in Xprofile custom field types

  • Participant
    Level: Initiated
    Posts: 16
    Nushara on #36186

    Hey there,

    I was wondering if I am able to limit image resolutions with this plugin? The only thing I have found this far is to limit the image size. But I would like to prevent users from uploading files bigger than for example 500x200px.

    Would be very great to have such a limitation.

    Thank you for your hard work!

  • Keymaster
    (BuddyDev Team)
    Posts: 24190
    Brajesh Singh on #36203

    Hi Nushara ,
    Thank you for the question.
    At the moment, the plugin does not support the limitations based on image dimension.

    I will pus a filter for validation in next release and then you can use custom code for the same.

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 16
    Nushara on #36204

    Hey Brajesh,

    thank you for the quick reply.

    Would it be possible to resize the image with the new filter validation? Or is it only displaying like “your image dimensions are too big, please use a smaller image”?

    Since most users are pretty lazy, and I think it would make sense to just resize bigger images instead of rejecting them.

    Would be great to have it like an option or something if it should resize bigger images or throw an error.

    Thanks for your work! It is very much appreciated.

  • Keymaster
    (BuddyDev Team)
    Posts: 24190
    Brajesh Singh on #36213

    Hi Nushara,
    I will add a filter that allows you to manipulate the error message/validation for the image.
    I am not planning to ad dimension setting in the plugin or the ability to resize.

    If we get enough votes on the same, we will add it to the core plugin then. The current goal is to have a basic image field that does not alter it in any way.

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 16
    Nushara on #36217

    Hey Brajesh,

    that’s a shame since I think a lot of people would really benefit from it. It would really come in handy to have like a max dimensions setting in the admin panel to limit file size and dimensions as an optional setting. Kinda like the “Birthdate Selector” is having some settings.

    It would also save some space since you could change its quality for JPEGs for example.

    But I can understand you wanting to keep it simple.
    To me this would be a great addition and I would do it on my own, but I don’t want to add too much changes to your code to stay update ready.

    How does the up voting exactly work?

  • Keymaster
    (BuddyDev Team)
    Posts: 24190
    Brajesh Singh on #36237

    Hi Nushara,
    Thank you for the prompt reply.

    I appreciate the feedback and do agree that it might be useful for some people. We will be glad to consider in in future.

    Please feel free to fork and submit a pull request with change. I will be glad to merge it.

    In our case, we consider forum topics or replies from different members as a vote in favour.

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 16
    Nushara on #36339

    Hey Brajesh,

    I don’t think my programming skills are well enough to get this production ready, so I would pass on that.

    But I could come up with something after you have added the initial feature and expand it by what I would use it for. So you could maybe work on top of that and release it for everyone to enjoy.

    Thanks for your hard work and feel free to get in touch for any ideas or details about this or other projects. xProfile really is a life safer for me, so I would be happy to help making it even greater.

You must be logged in to reply to this topic.

This topic is: not resolved