You can't automatically resize a canvas to fit an image in Photoshop, but you can use several methods to achieve a similar result. Here are two options:
1. Use the "Fit to Canvas" option when placing an image:
- Go to Edit > Preferences > General and check the box that says "Resize Image During Place."
- When you place an image, it will automatically resize to fit your canvas.
2. Utilize the "Reveal All" and "Trim" tools:
- Reveal All: Use the Image > Reveal All command to extend your canvas to include the entire image.
- Trim: Use the Image > Trim command to reduce the canvas size to just the visible parts of the image.
You can also manually resize your canvas by selecting Image > Canvas Size. This gives you more control but does not automate the process.