Do I need to state the image width and height in my share tags? And why does the tool warn me when I only fill in the width?
You do not strictly need them. They are optional hints that can help a platform lay out the card before it downloads the image. But they work as a pair: a width with no height says nothing about the image's shape, so the tool warns when only one is filled. Give both, or leave both out.
What happens when you enter only the width
We typed 1200 into 'Image width in px' and left the height empty. The tags came out with an og:image:width line on its own and a warning: 'Only the width or only the height was entered. It is better to give both.' The tool does not block you, but a width alone cannot say whether the picture is wide, square or tall.
Once we added 630 as the height, the warning went away and both lines appeared:
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
Arabic digits are fine
If your keyboard types Arabic-Indic digits, enter ١٢٠٠ and ٦٣٠ as they are. The tool converts them to 1200 and 630 in the tags, since tags use Western digits. Persian-style digits such as ۶۳۰ are accepted too, which helps when you copy the numbers from a phone set to Arabic.
What the tool rejects: a unit typed next to the number such as 1200px, a decimal, or zero. In those cases you see 'Enter a positive whole number of pixels, such as 1200', and no tags appear until you fix it. Type the number alone; the field is already in pixels.
The tool does not measure your image
This is the key point: the tool never opens the image and does not know its real size. If you type 1200 and 630 but the picture is actually 800 by 800, the tool writes what you typed and a platform may lay the card out wrongly. Only enter the numbers when you are sure of them.
- Open the image file on your computer and check its properties for the width and height in pixels.
- If you want specific dimensions, resize it first in the Image resizer and upload the new copy.
- Type both numbers into the Open Graph metadata builder, in Arabic or Western digits.
- Make sure the size warning is gone, then copy the tags.
And dimensions with no image?
If you enter a width and height with no image URL, neither is written, and the tool warns that dimensions were entered without an image URL. Dimensions describe a particular image, so they are never written on their own. Each field accepts 1 to 100,000 pixels.
Common questions
Is 1200 by 630 an official size?
The protocol sets no size. A wide image close to 1.91:1 is common for the large card, but that is common practice rather than a rule; check each platform's documentation.
Is leaving both fields empty a problem?
No. Both are optional, and the tool gives no warning when both are absent.
Are the dimensions written into the Twitter tags too?
No, the tool writes them only as og:image:width and og:image:height.
