How to Lock a Layer in GIMP
GIMP lets you lock layers to prevent certain kinds of accidental changes. You can lock the pixels, lock the transparency, lock the position, or lock visibility. These locks are especially useful when working on complex compositions with many layers - They give you guardrails so you do not accidentally paint on the wrong layer.
The Four Lock Types
| Lock | What it prevents | Use case |
|---|---|---|
| Lock Pixels | Painting, erasing, or filling the layer | Protect a finished layer from brush strokes |
| Lock Alpha (transparency) | Changing transparent areas | Paint only inside existing content, never outside it |
| Lock Position | Moving the layer | Fix a background or guide layer in place |
| Lock Visibility | Toggling the eye icon on/off | Keep a reference layer always visible |
How to Apply Locks
In the Layers panel, look at the row of small icons between the layer thumbnail and the layer name. In GIMP 2.10+, you will see a series of lock icon buttons:
- Click the layer in the Layers panel.
- Click the appropriate lock icon button at the top of the Layers panel (not on the layer row itself - look for the row of small icons near the top of the panel).
When a lock is active, the icon highlights. Attempting a locked operation will either be silently ignored or show a brief error indicator. GIMP does not display a warning dialog - it just does nothing.
Lock Alpha - The Most Useful Lock
Lock Alpha (sometimes called "Lock Transparency") is the most commonly used lock. When enabled, painting on the layer only affects pixels that are already opaque - you can never paint into the transparent areas.
This is extremely useful for:
- Recoloring a shape or icon: Lock Alpha on the shape layer, then fill with a new color. The fill stays inside the shape automatically.
- Shading over existing artwork: Lock Alpha and paint shadows or highlights with a soft brush - The paint never goes outside the shape boundaries.
- Retouching cutouts: After removing a background, Lock Alpha protects the transparent edges while you work on the subject.
The same transparent area protection that layer masks provide in a non-destructive way, Lock Alpha provides in a simpler direct-paint workflow. For quick recoloring jobs, Lock Alpha is often faster than creating a mask.
How to Unlock a Layer
Click the same lock icon again to toggle it off. The icon de-highlights and the lock is removed.
Locks are saved with the .xcf file. If you share an .xcf with someone else, the locks will still be active when they open it. This can cause confusion if someone does not know to check the lock icons when an operation appears to be doing nothing. A quick habit: if a tool seems to have no effect, check the lock icons in the Layers panel first.
Quick Recap
- Lock icons appear at the top of the Layers panel
- Lock Alpha is the most useful - confines painting to existing opaque pixels only
- Lock Position prevents the Move tool from repositioning the layer
- If a tool has no effect, check if a lock is enabled
Explore on GIMP.cc
Share this article: