Skip to content

Combining 2 images into 1 side by side image #3137

Closed

Description

@james-Solutions

Hello,

I am using Sharp to create thumbnails from existing images, loading pngs into nodebuffers that is. This works great image by image. However, there are times I may want 2 images to be combined in a way that the images are next to each other. Not overlayed each other. Meaning, say I have images A and B. I would want to combine both images and resize them to output like:

https://imgur.com/ci5umRa

The input images maybe any size, but I want the combined images to be 96px in width. Which works with resize, however, I am unsure how to make the images side by side rather than overlayed.

Activity

  1. lovell commented on Mar 15, 2022

    @lovell
    Owner

    Please see future possible enhancement #1580

  2. james-Solutions commented on Mar 15, 2022

    @james-Solutions
    Author

    Please see future possible enhancement #1580

    @lovell This is working with an older version of sharp.
    https://github.com/ccpu/join-images

  3. lovell commented on Mar 15, 2022

    @lovell
    Owner

    Yes, it's possible to replicate this feature using the composite operation, which is what the join-images package appears to do. A native join feature should be much faster.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions