:image (since jQuery 1.0) selects every <input type="image"> — a graphical form submit control that looks like a picture. Official docs state it is equivalent to [type="image"]. It does not match <img> tags. Always prefer $("input:image") over bare $(":image").
Syntax
Start with these common calls. Keep them short and readable.
jQuery
$("input:image") // all image inputs
$("form input:image") // image inputs inside a form
$("input[type=image]") // equivalent attribute form
$("img") // content pictures — different!
// Avoid on large pages:
$(":image") // implies *:image
Call
What it does
Selector string
:image filter (best with an input prefix)
Form / context
Avoids image inputs in unrelated widgets
src / alt
Picture and accessible label for the control
Return value
jQuery collection of matching image inputs (may be empty)
Load jQuery before your script (CDN or local file), then wrap DOM work in $(function () { ... }) when needed.
Parameters
Parameter
Description
Step 1
Write $("input:image") — never bare $(":image") on large pages.
Step 2
Scope to a form: $("#pay input:image").
Step 3
Remember: this is a submit control, not an <img> element.
Return Value
Return Value
Description
See examples
Check the examples below for what this API returns in common cases.
jQuery Examples
Example 1 — Official Demo: input:image
Style image inputs and print the match count (jQuery API example).
jQuery
var input = $("input:image").css({
background: "yellow",
border: "3px red solid"
});
$("#count").text("For this type jQuery found " + input.length + ".");
For this type jQuery found 1.
Image input highlighted
Text / checkbox / button → unchanged
How It Works
Select.input:image finds every image-type input.
Filter. Only type="image" matches — other inputs are ignored.
Style. Official demo applies a yellow background and red border.
Example 2 — Equivalence: :image vs [type=image]
Official docs — both forms select the same elements.
jQuery
var a = $("input:image").length;
var b = $("input[type=image]").length;
console.log("input:image →", a);
console.log("[type=image] →", b);
console.log("same set?", a === b);
image inputs: 1
img tags: 1
Titles show form control vs content picture
How It Works
Form control.:image keeps input type="image" only.
Content.$("img") keeps picture elements in the page.
No overlap. An element never matches both selectors.
Frequently Asked Questions
:image selects every input whose type is image — graphical submit buttons rendered as pictures. $("input:image") finds all image inputs in the search context. Available since jQuery 1.0.
No. :image matches input[type="image"] only — form submit controls. To select picture elements in content, use the element selector $("img") instead.
Yes. Official jQuery docs state that :image is equivalent to [type="image"]. For native querySelectorAll performance in modern browsers, prefer input[type="image"] over the :image pseudo-class.
Prefer $("input:image"). Bare $(':image') implies the universal selector and scans as $('*:image'), which is slower on large pages. Official docs recommend prefixing with input or scoping to a form.
:image matches only input[type="image"]. :submit matches submit buttons (input or button). :button matches button tags and input[type="button"]. An image input is its own control type.
No. It is a jQuery extension (not part of the CSS specification), so queries using :image cannot use the native querySelectorAll boost. Use [type="image"] when performance matters.