This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Emily Rautenberg
Posted Sep 18 - Read on Facebook

Hi all! I know there are a number of different ways to make this work, but I was hoping I could get your advice! I'd love to hear different opinions and the pros/cons to all these solutions.

In a module, I have a layer that should contain an image corresponding to what argument is passed into the module. Not all of the images are the same size (the height is always the same, the width is variable), but the image should always be positioned on the same X/Y coordinate. I need all of the images to be displayed at their original size.

I'm coming from a Unity background of adding these kinds of images to an Atlas and accessing by the image title anywhere.

At this point, let's say there are 100 different images, all already built out in Sketch. Should I:

- Import from Sketch into App.coffee and pass the layers all the way down to this Module? (this particular module is actually a little buried...it extends a class which extends a class which is created in another, etc.)

- Import from Sketch into App.coffee, parent to the Window, and access the window's children from the module? This feels like cheating to me.

- Add all of these images to the Design tab, create targets, and access the targets anywhere?

- Create a JSON file with each image URL and dimensions, pass that into the module, and fill in the height and width appropriately, etc.?

-Since all the images are the same height, just export them all out at the width of the widest image with some transparent space on the side?

- Any other of the many many solutions possible that I didn't take the time to write out.

Like I said, I'd love to just hear everyone's opinions and experiences dealing with this kind of thing. Thanks :)