This plugin fills a specific need that some pro
photographers have, which is the ability to sort images by their megapixel
size, even after cropping.
This plugin works in Lightroom 6/CC (and older versions as far back as
Lightroom 3, though some features depend on the
version of Lightroom).
The same download works for both Windows and Mac. See the box to the upper right for the download link (in orange) and installation instructions.
Note: also see
my powerful Data Explorer
plugin, which lets you partition and group imgaes by 213
different data-related criteria, including image megapixels (both original and cropped)..
As shipped, Lightroom does have a “Megapixels” metadata item that is
normally hidden, although it can be viewed by adding it to a
metadata-viewer preset (such as with my Metadata-Viewer
Preset Builder plugin). Unfortunately, that reflects the pixel size of
the original image, not taking into account any crop that might have been
applied. And even then, it's not among the items one can sort on, or even
select via the Library Grid's Library Filter
Possible values for the
custom metadata item
|not yet computed|
|< 0.5 MP|
|0.5 MP||-||0.99 MP|
|1 MP||-||1.99 MP|
|2 MP||-||3.99 MP|
|4 MP||-||5.99 MP|
|6 MP||-||7.99 MP|
|8 MP||-||11.99 MP|
|12 MP||-||15.99 MP|
|16 MP||-||23.99 MP|
|24 MP||-||31.99 MP|
|32 MP||-||47.99 MP|
|47 MP||-||63.99 MP|
|64 MP||-||99.99 MP|
|100 MP||-||199.99 MP|
|200 MP||-||349.99 MP|
|350 MP||-||499.99 MP|
|> 500 MP|
This plugin creates two custom metadata items for each image it is
applied to. The first, “Cropped Megapixels”, has values like “12.05 MP”. The second, and “Megapixel Range”,
has one of the values listed in the box at right.
Once this data has been calculated for each image (see below), it can be
viewed via the “All Plug-in Metadata” preset in the Metadata panel of the
Calculating and Recalculating
Unfortunately, the Lightroom plugin infrastructure does not yet allow
for custom metadata to be created and updated automatically, so you must
explicitly tell the plugin to calculate the custom metadata.
So, this plugin adds two items to the File > Plug-in Extras
menu, “Calculate Megapixels” and “Calculate Megapixels For Entire Catalog”. The former calculates the two custom-metadata values for each selected
image, while the latter does it for every image in the current catalog.
The plugin has no way of knowing when you make a cropping adjustment to
an image, so you must remember to reapply the plugin to any images whose
crop you change. That's a real hassle, and perhaps some future version of
Lightroom will alleviate this burdensome requirement.
Still, even on my sort-of-old computer at home, the plugin can
recalculate the data for my entire 45,000-image catalog in only about 30
seconds, so it's not that bad to just redo everything. Note that it's much
more efficient to use “Calculate Megapixels for Entire Catalog” than
selecting every image in the catalog and invoking “Calculate Megapixels”.
“Sorting” By Megapixel Size
You can't actually sort via megapixel size, even using this
plugin, but you can use the Library Filter to do something close. The Library Filter is in the Grid Module; use the
“/” key to bring it into view if it's not already visible.
(Be sure that you've calculated the plugin metadata, as described above,
prior to this step.)
In the Library Filter, select “Metadata”, then click on one of the
column heads and select “Megapixel Range”. You should then be presented
with a list of the range items that apply to the currently-visible images. If they all have the same crop, they'll all be within one range, and so only
one value will display. But if their image sizes or crop sizes put them into
different ranges, multiple lines will show.
You can then click on one of the lines to isolate only the associated
This plugin is distributed as “donationware”. I have chosen to make it available for free — everyone can use
it forever, without cost of any kind — but unless registered, its functionality is somewhat reduced after six weeks.
Registration is done via PayPal, and if you choose to register, it costs the minimum 1-cent PayPal fee; any amount you'd like
to add beyond PayPal's sliding fees as a gift to me is completely optional, and completely appreciated.
Note: a Lightroom major upgrade, such as from Lr5 to Lr6, de-registers the plugin in the
upgraded version, so if you want to maintain registration, a new ($0.01 if you like) registration code is needed in the upgraded
version. It makes for a hassle every couple of years, I know. Sorry. See this note for details.
For details on plugin registration and on how I came into this hobby of Lightroom plugin development, see my Plugin Registration page.
Update Log via RSS
Try to avoid yet another place where Lightroom gets hung because it can't handle certain kinds of dialogs at the same time.
In the POODLE-vunerability dialog, display a raw URL of a page on my site that discusses the issue, so that folks can be independently sure that the dialog is indeed from me and not malware.
Windows Only: Add a one-time check for the POODLE security vulnerability, and alert the user if it exists.
Previous updates broke support on Lightroom 2
Fixed an issue with Creative-Cloud revalidation.
Lr5.5 and later Creative-Cloud installs can now revalidate themselves if needed.
Sigh, had a bug in the Creative-Cloud support.
Now supports Lr5.5+ Creative-Cloud Installs.
Sigh, introduced an error for some folks with the rebuild the other day.
Added an "Expunge Plugin Data" section to the plugin manager, to allow plugin data to be cleared from the catalog.
Fixed a bug in the "smoother revalidation" stuff recently added.
Make the revalidation process smoother, especially for folks using Lr5.4 and later.
Apparently, a recent change broke things on Lr2, which some folks apparently still use.
Fix an "attempt to perform arithmetic on field" error.
Update to handle the Mac App Store version of Lightroom.
Tweak for Lr4.1RC2.
Enhanced the send-log dialog to hopefully make reports more meaningful to me,
yielding, I hope, the ability to respond more sensibly to more reports.
Had broken registrations in Lr2; Update to the debug logging to better track down timing issues that might arise.
More on the march toward Lr4, including upheaval in the code to handle Lightroom APIs being discontinued in Lr4.
Update for Lr4 beta: explain in the plugin manager that the plugin can't be registered in the beta.
Had issues with the registration button sometimes not showing.
When doing a plugin upgrade, offer the ability to flush all the old copies of the plugin.
Added a system-clock check and reports to the user if the system clock is more than a minute out of
date. An incorrect system clock can cause problems with various kinds of communication and authentication
with some of my plugins, so I've just gone ahead and added this to every plugin.
Made the revalidation process much simpler, doing away with the silly need for a revalidation file.
Discovered a bug in my plugin build system that caused horribly difficult-to-track-down errors in one plugin,
so am pushing out rebuilt versions of all plugins just in case.
Discovered a nasty build bug; pushing a new version in case it affects this plugin.
This version can be registered in
Lightroom 3. It can run in Lightroom 2 or Lightroom 3; it does not work in the Lr3 betas.
It uses my new registration system when run on Lightroom 3,
which avoids some of the silly issues of the old one. Please take care to note
the details on the registration
page: use of this version (or later) of the plugin in Lightroom 3 requires a new
registration code, even if you had registered some older version of the plugin.
Completely changed how the one-click upgrade applies the newly-downloaded zip file, in the hopes that
it'll work for more people. Rather than unzipping over the old copy, it now unzips to a temporary
folder, then moves the old folder out of the way and the new folder into place. Prior versions' folders
are now maintained (with the version number in the folder) in case you want to revert a version; you
may want to clear them out from time to time. Of course, it won't take affect until you try to upgrade
after having upgraded to or beyond this version.
Wholesale changes that attempt to honor the user's locale settings for numeric display (e.g. Europeans
writing 3,14156 for pi). I've probably missed some spots, so let me know if you find some.
Broke out the “< 0.5 MP” item into two,
“< 0.1 MP” and “< 0.1 - 0.49 MP”.
The change is not immediately reflected in photos that were processed earlier, so
if you're interested in the new slice, you'll want to recompute MP for ones
currently marked “< 0.5 MP”, or just recompute for your whole
Sigh, I shouldn't try to program while on vacation... the previous version was totoally
broken. Trying again.
It seems that Lightroom reports that some images have no size
(which makes no sense, of course), so I've added more debugging stuff to the log
for these cases...
Expanded the upper end of the range from “> 64 MB”
to “> 500 MP” to accommodate the fact that Lightroom can handle
images up to 512 megapixels.
Enhanced the one-click upgrade stuff quite a bit, now
detecting ahead of time when it will fail because the plugin is installed where Lightroom
can't write (if Lightroom can't write to it, it can't update itself). I
also added a progress bar, and now download in smaller chunks to avoid 'out
of memory' errors on the larger plugins. Do remember that this new functionality becomes
available after you upgrade to or past this version, when you then upgrade with it.
Fixed a "loadstring" error some users got.
Added a link in the Plugin Manager to the plugin's update-log RSS feed.