joe_g Posted February 8, 2021 Posted February 8, 2021 Hi all, What would be the best way to maintain different crops of the same image 'desktop', 'mobile', or perhaps 'landscape', 'portrait', 'square', etc? And perhaps with some fall back, that if mobile is missing, it falls back to desktop, or similar? I was hoping to avoid having to make separate fields for variations, if possible. many thanks! J
Zeka Posted February 8, 2021 Posted February 8, 2021 Hi @joe_g Are you talking about images in the image field?
joe_g Posted February 8, 2021 Author Posted February 8, 2021 Yes, If I have an image, then would like to store different crops - possibly to be used together with the <picture> element
Zeka Posted February 8, 2021 Posted February 8, 2021 @joe_g Perhaps you not fully understand how image fild works in PW. You can upload an image to image field at than use API for getting needed sizes and variations. https://processwire.com/docs/fields/images/
joe_g Posted February 8, 2021 Author Posted February 8, 2021 @ZekaWhat I'm looking for is that the editor is able to do custom named crops. I'd like the editor to be able to manually decide how a 'mobile' crop should be cropped. So not just automatically cropped from the center, and also not cropped from a focus point (which is mentioned elsewhere) but a custom named crop where the editor decides exactly what crop is going to be "portrait" for example. I'd like to be able to define named variations such as "portrait, square, landscape" and the editor can make manual crops for each of these three named crops (but based on the same image), and save them as separate variations. Then again, perhaps I'm over-complicating things. I should just stick to using focus point. It's slightly less flexible in that you have to choose one single focus point, but easier to reason around perhaps. I have a client with images that has some quite specific requirements, like top-right crop for mobile, center for desktop and center-right for tablet (for example) - you can't do this with focus point. thanks again
Robin S Posted February 8, 2021 Posted February 8, 2021 1 hour ago, joe_g said: What I'm looking for is that the editor is able to do custom named crops. I haven't used it, but I think that is what Croppable Image module is intended for: https://processwire.com/modules/croppable-image3/ 2
joe_g Posted February 8, 2021 Author Posted February 8, 2021 @Robin S YES! Thank you! This is exactly it. Not sure how I missed it?! ...! 1
joe_g Posted February 8, 2021 Author Posted February 8, 2021 @Robin S Update: seems shaky. Gives error " Notice: Undefined index: quality in .../CroppableImage3Helpers.class.php on line 207". Then, uploading doesn't actually work (never ends). But thanks anyway!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now