Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8564221
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T17:08:50+00:00 2026-06-11T17:08:50+00:00

Is it possible to get the width and height of an image in node.js

  • 0

Is it possible to get the width and height of an image in node.js (on the server side, not the client side)? I need to find the width and height of an image in a node.js library that I’m writing.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T17:08:51+00:00Added an answer on June 11, 2026 at 5:08 pm

    Yes this is possible but you will need to install GraphicsMagick or ImageMagick.

    I have used both and I can recommend GraphicsMagick it’s lot faster.

    Once you have installed both the program and it’s module you would do something like this to get the width and height.

    gm = require('gm');
    
    // obtain the size of an image
    gm('test.jpg')
    .size(function (err, size) {
      if (!err) {
        console.log('width = ' + size.width);
        console.log('height = ' + size.height);
      }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I have an image that I need to call .width and .height but
Does any one know if its possible to animate app.current.mainwindow.width so that you get
Is it possible to use JavaScript to get the actual size (width and height
Possible Duplicate: Set size on background image with CSS? I need to find a
Searching for possible ways to get cookie with httpOnly enabled, I cannot find any.
Is it possible to get Windows Server 2003 hosted with options similar to Linux
I'm trying to create a thumbnail image on the client side using javascript and
Possible Duplicate: CSS - Equal Height Columns? I'm not the greatest with css, so
I made a game that sets the width and height of the canvas as
I'm looking to get the dimensions, width and height, of a remotely hosted JPG.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.