The short answer
In most places, yes, with written consent for each case, captions that state what was done, and images that have not been edited. In Australia the position is much tighter, and in a few other markets it is restricted for certain procedures, so confirm with your own regulator before you build the page.
That is the whole answer. The rest of this post is the detail behind each part of it.
Consent, per case, in writing
Not a general permission signed at registration, and not a verbal yes in the chair. A separate written consent naming the images, the treatment and the places they may be used, signed by that patient.
It should say that images published online can be seen anywhere, that copies saved by others cannot be recalled, whether the face is included, and that the patient may withdraw at any time. Keep the signed record with the case, so anyone in the practice can find it without asking you.
In the United States, if the practice is a HIPAA covered entity, marketing use of identifiable patient images generally needs a HIPAA authorisation rather than an informal consent. In the UK and the EU, the images are health data about an identifiable person, so your privacy notice and lawful basis have to cover marketing use.
Unedited, and shot the same way
Same lighting, same angle, same distance, same background for before and after. Colour-balance both identically or not at all. No software whitening, no smoothing, no filters.
A pair shot differently is not a comparison, and presenting it as one is the thing advertising regulators actually act on.
Captions that say what happened
Name the treatment, the number of visits and the timescale, and note any preparatory work such as orthodontics that formed part of the result. Say who treated the patient.
Avoid claims about how long a result will last or what any other patient will get. Individual results vary, and saying so plainly is better than a disclaimer nobody reads.
Where the rules differ
United Kingdom. The General Dental Council sets standards for registrants and the Advertising Standards Authority enforces the CAP Code on your marketing. The expectation is genuine, undoctored images that are representative of what patients can reasonably expect, with claims you can substantiate.
United States. Advertising sits with the Federal Trade Commission for deception generally and with your state dental board for profession-specific rules. Boards differ, and some address before-and-after imagery, disclaimers or typicality directly, so read your own state's rules rather than a national summary.
Australia. The strictest of the five. Advertising of regulated health services is governed by the National Law, which prohibits testimonials about clinical services, and the Australian Health Practitioner Regulation Agency publishes advertising guidance that sets tight conditions on before-and-after images. Plenty of Australian clinics choose not to publish them at all.
Canada. Provincial dental colleges set advertising standards, and several restrict testimonials and comparative claims. Check the college you are registered with.
European Union. National rules vary, and some member states restrict comparative imagery for particular procedures. Confirm locally.
This is orientation, not legal advice. Your regulator's current guidance is the authority, and it changes.
What to do if you cannot publish them
Treatment pages should not depend on a gallery to work. If yours cannot carry one, the page still has to earn the consultation through the clinician's credentials and training, a clear account of what happens and over how long, an honest from-price with finance, and questions answered the way you would answer them in the chair.
Video of the clinician explaining the treatment does much of the work a gallery would have done, and is usually far less restricted than patient imagery. Check that too before you publish it.
Build the site so a case can be pulled in a minute
Consent can be withdrawn. Someone will ask, and the answer has to be that it is already gone rather than that you will speak to your web person on Monday.
Each case should be its own record with its consent reference attached, publishable and unpublishable on its own, and each treatment gallery should be switchable off without touching the page around it. If you market into a country with different rules, the gallery needs to be suppressible for that audience.
Where this sits
Consent records held per case, factual captions and galleries you can switch off by case, treatment or country are how we build the results section of a cosmetic dentistry and implant clinic website, and the same care runs through the other dental practice websites we make. What each package includes is on pricing. Get the consent and the caption right and the photographs do the selling for you.