I have very low trust in online recipes in general, and always evaluate the source of them first.
But books are not, overall, that much better! Whatever testing was done was often done ad hoc or in professional kitchens, or on a much larger batch that was arithmetically scaled down to home sizes. This often works fine but not always, and usually needs some tweaking. It tends to be especially true of cookbooks affiliated with a well known restaurant or chef, but certainly not limited to that.
Cookbook recipe testing is basically like fact checking in non-fiction. It's up to the author and not invested in or validated by the publisher, unless the publisher is specifically specialized in cookbooks. Usually this means some of the recipes were tested by the same handful of friends & family. The fact that there's a photo means very little, just that someone made that dish once. No cookbook has photos of every recipe.