Hey,
How can I restrict users to upload square images as profile image. Right now users can upload images of any dimension. It doesn’t look good as I show profile images of users part of the community.
Also, I wanna restrict to JPEG only to avoid transparent background or such
Also you can use “:processed with imgix” after the dynamic part of where you display your photo to crop it to a square. I’m sure there is a way to make that work prior to uploading as well.
1 Use TT Upload Buddy (paid-for plug in) to get the image on the client, restrict formats, scale and upload. It has states so when one state is complete the next WF can initiate. The user only selects the file and the rest just happens if you set the WFs up in this way.
2 Load Croppie immediately (use a custom state to detect that an image has been loaded) and offer a frame that is square. You can add rotate buttons etc. Save the image with a button. That should do the trick. You might want to use a popup for this or overlay groups.
3 This results in an unneeded file on Amazons servers (data > file manager) so on the current user record, have a data item to hold a redundant reference to the Amazon server which I will call ‘redundant_ref’. Whenever an image reference becomes redundant in the current user’s image and you are going to overwrite it, use actions to transfer the image reference from the current user’s profile image data item to this other data item, ‘redundant_ref’. Then have an action delete the uploaded file referring to “Current user’s redundant_ref:saved to S3”
Both plugins need time to understand the settings and the transition between them is a little lumpy.
I can’t seem to get a Croppie Image Result to save to a User’s logo field; making changes to the Current user’s logo from the direct result doesn’t seem to be saving an image.