Google Photos can do a lot of smart things with your pics. It suggests archiving bills and other paperwork, it applies color pop effects on some of your portrait snaps, and not very long ago, we were told it'd start recommending cropping pics of documents. While the latter is still not very reliable — you never really know when the suggestion will pop up and when it won't — there's now a manual document cropping extension in Photos.

Tap the edit button on any pic and you'll get a blue bubble telling you about the new crop document extension. It resides under the rightmost menu in Photos' editor, and when selected, a free cropping interface shows up. It doesn't seem to suggest or automatically detect document borders though, so you'll need to make the edit manually. Edit: As pointed out, there's an "Auto" option that shows up when you first open the extension. It automatically detects document borders and saves the crop. Thanks, Steve, @LBPHeretic!

Unlike the regular crop and rotate function, this doesn't limit you to square or rectangular shapes, and there's a zoomed-in view to home in on the exact border of a document. When you're done, the image is cut and straightened to look like a proper document. You can then save your edit. As with most changes in Photos, these are non-destructive so you can always go back to the original image.

The extension is available for all photos, not just documents. That slightly tilted food snap you took in a haste can be straightened out, just like any paper or bill or whiteboard.

The cropping document extension appears to be live as part of Google Photos 4.26. Both of my devices (a Pixel 2 XL and OnePlus 6T) have it, but it might be a server-side switch slowly rolling out to all.