Questions about image field

It’s hard to believe there is no option to enter a custom ALT tag. The method above won’t be appropriate if you have several images on a page, plus the recommendation for accessibility is to be able to add a description of the photo, not just the title of the page. Is there any way to add a field for a ContentBlocks “Field”? Other useful options would be width, alignment, class.

Also, Image with Title is good, but Image with Caption (WYSIWYG editor) would be even better.

In short, adding some of the capabilities enabled by editors like WP Bakery would be very welcome.

Have you looked at field settings? You can add a bunch of different extra inputs to fields, precisely for that sort of thing. Just edit a field and see the Settings tab.

As a super power option there’s also the repeater. Set that to a limit of 1 row, and it behaves as a group of inputs supporting all the different input types contentblocks supports (even layout and other repeaters).

If you think you can’t fill an alt tag with ContentBlocks you’re not even scratching the surface of what it can do yet. :wink:

Well, I knew there had to be more! Yes, I see what Settings does now. Great.

For width and height, though, it would be better to have the two have an option to be linked, so that the height scales proportionally to the width. Also, cropping like ImagePlus would be ideal, so that the crop can be changed at any time. Although, I can’t really see how it works because I’m getting an “Invalid crop specified” error every time I try to save a crop. Does ImagePlus integrate with this at all?

FYI, I’ve moved this into a separate topic rather than that 2 year old one. :wink:

If you have a simple template and just want to make sure a large file is resized to a max size, you can provide just the width (or height) to pthumb and have that work out the aspect ratio. I wouldn’t personally ask clients to provide a pixel size.

It’s not ImagePlus. (But looks like it.) See the cropper documentation on how that works:

If you can’t get it to work, please provide a screenshot and/or export of your field (properties). It sounds like you’ve either configured it partially or perhaps have mismatched crop keys.

It works if I specify a custom crop size string. If I leave that blank in the Image field, AND turn on “Open cropper by default”, default aspect ratios show up, and that’s when I get the error when I click the Save button. If specific crops need to be set before cropping can work, maybe add some error checking to prevent people from leaving the crop settings blank and also turning on “Open cropper by default”?

I’m beginning to see how the crop function works, and what to do with it, so this is looking pretty cool!

Is there any way to specify a crop that is the original ratio? I want the medium size to be the same ratio as original for starters. Or, is there some way to make Original the default aspect in the cropping tool instead of Free? Also, is there some way to make a crop for one size fill the whole image to start, instead of starting off cropping the image?

One thing that would make this more user-friendly:

When I insert an image and the cropping tool opens, I expect to be able to create the three crops (or however many I have specified) and then click the Save button to save them all. The thumbnails on the left get created automatically, whether or not I have save each crop, so it looks like I’m saving a whole set. If each crop HAS to be created separately, maybe don’t display thumbnails on the left until a crop for that size has been saved?

ALSO, it would be great to be able to make certain settings required. For example, I want editors to always enter alt tags for images to satisfy accessibility requirements.