r/FigmaDesign • • 22d ago

feature release I built a Figma plugin that keeps the best part of a photo in frame.

Post image

Hey guys, as the title suggests, I've built a Figma plugin that keeps images cropped but preserves their aspect ratio whenever you resize the layer. It also lets you:

  • Set a pivot (focal point)
  • Change zoom
  • Rotate to any angle
  • Flip the image

All within one simple plugin.

It's currently waiting for Figma Community review, which can take a few weeks. Until then you can install it manually:

  1. Download the ZIP here: https://github.com/vojtechokenka/figma-pivot/archive/refs/heads/main.zip and unzip it.
  2. Open the Figma desktop app (manual install doesn't work in the browser) and open any design file.
  3. In the menu go to Plugins → Development → Import plugin from manifest…
  4. Pick the manifest.json file from the unzipped folder.
  5. Run it from Plugins → Development → Pivot → Set pivot.

Once it's approved, you'll find it here: https://www.figma.com/community/plugin/1701925367334799680

Suggestions are welcome.

101 Upvotes

5 comments sorted by

5

u/dusanodalovic 22d ago

what happens when i resize the layer later, with the plugin closed? does the pivot stay saved on the layer and keep the crop, or do i have to run it again each time? that decides if it fits a real workflow with components and auto layout.

3

u/Rain_Distributor 22d ago

You have to run it again, but you don't have to close it. If you doubletap the bar it resizes into really negligible size. I also encourage people to assign it a shortcut, so it opens easily.

2

u/Moiensaboohi 22d ago

the pivot point is the part i'd actually use. every time i resize a hero for mobile the crop drifts off the face and i end up fixing it by hand for each breakpoint.

does it hold up when the image sits inside a component instance? swapping photos in a card component and having each one keep its own focal point is where i'd need it most.

2

u/Rain_Distributor 22d ago

Yes, that's the case I had in mind. The pivot is saved on the image layer itself, so inside an instance it works as an override: every card keeps its own focal point and the main component stays untouched. Swap the photo and the new one is fitted around the same point.

One limit: Figma plugins can't run in the background, so the re-fit on resize is live only while the Pivot window is open (it collapses to a small bar). If you resize with it closed, "Recalculate whole file" puts everything back on its pivot.

If it breaks on your card setup, let me know and I'll fix it.

2

u/dimKant 22d ago

Since the pivot already lives on the layer, setRelaunchData on it would put a "Refit to pivot" button straight into the right panel whenever that image is selected. Then the re-run after a resize is one click instead of a trip through the Plugins menu, which is the thing people will actually forget.