Mac OS X does this for all filesystems which don't support resource forks. I don't know as if Mac OS X actually stores the generated thumbnails in the resource fork though. I just thought it was an interesting aside. Posted by tomierna at 12:48 PM on November 23, 2008. To view the Live Photo's movie component you simply tap and hold the photo within the Photos app on the iPhone, iPad or Apple Watch. When viewing a Live Photo's thumbnail within the main photos. Make good photos great. You don’t have to be a pro to edit like one—use the Photos editing tools to give your pictures just the right look. You can crop and straighten, remove red-eye or blemishes, improve light and color, and more. 2 other things to try to fix missing file preview thumbnails: Make sure “Show preview” options is selected. If the problem is only affecting a specific folder, look at your folder’s “View Options” (finder view show view options) then select “show icon preview. Close the options window.
Update My PreviewMarkdown app, which provides Markdown file previews and icon thumbnails in Catalins, is now available from the Mac App Store.
Providing content-based icon thumbnails in macOS Catalina follows the same pattern as generating file previews: QuickLook runs code from an app extension and calls a function within that code to draw the image that will be placed on the icon.
Markdown file previews in Catalina, courtesy of PreviewMarkdown
To add an extension to an app, just add a new target to the app’s Xcode project. Xcode has templates for both QuickLook Preview and Thumbnail extensions, and selecting either of these provides you with the core code resources you need. In this post, I’ll focus on thumbnailing; this post covers previews.
The template contains a file called
ThumbnailProvider.swift
which includes a class called ThumbnailProvider, which is a sub-class of QLThumbnailProvider and includes a single function, provideThumbnail(). This is the function called by QuickLook when, for example, Finder asks for an icon image to present.provideThumbnail() has two parameters. The first, for, receives a QLFileThumbnailRequest instance which provides information about the file to be thumbnailed. This instance can be accessed by your code as the variable request. The second parameter receives a block of code which your own code calls as a function, called handler(), when it has prepared the thumbnail (or it was unable to do so).
handler() expects to be provided with two arguments. The first is a QLThumbnailReply instance, the second
nil
or an Error if you couldn’t generate the thumbnail for some reason.Typically, then, your code will load in the file located at the URL stored in the request’s fileURL property. You then render the content as an image, which your drawing code, supplied via the QLThumbnailReply instance, draws into the current graphics context.
This is easier to show with an example than to describe, so here is the business part of own of my thumbnailers. You can see the full code here:
The do… catch structure is included if there’s a problem reading a markdown file in the second line. The code then specifies a frame based on dimensions included in the QLFileThumbnailRequest instance’s properties. Icon files have an aspect ratio that’s roughly 3:4, which is why we set the thumbnail width to 0.75 times its height. We set the (larger) frame that we’ll create a view with to the same aspect ratio for easy scaling.
The code instantiates an NSTextView object and then sets that instance’s content to be an NSAttributedString assembled from the loaded markdown, in this case using code derived from the iOS-oriented SwiftyMarkdown library. We then generate a bitmap graphic (as an NSBitmapImageRep) from the NSTextView.
Macos Photos Tutorial
Next we create the QLThumbnailReply that we’ll return to QuickLook via the function referenced by handler. QLThumbnailReply has a selection of three initializers you can choose from: one that assumes you’ll be drawing the current graphics context, one that provides you with a context to draw in, and one that doesn’t use contexts but rather expects you to provide the URL of a graphics file on disk. My code uses the former: it draws the NSBitmapImageRep into the thumbnail-sized frame we calculated earlier, then returns
true
to indicate the thumbnail was drawn.Thumbnail App Download
Finally, we call handler(), passing in the QLThumbnailReply instance and
nil
(to indicate there was no error getting the file data).So what happens at runtime?
- QuickLook instantiates a ThumbnailProvider object and calls its provideThumbnail() function.
- provideThumbnail() loads and renders a bitmap image.
- provideThumbnail() creates a QLThumbnailReply instance and passes in a closure containing drawing code.
- provideThumbnail() hands control back to QuickLook and hands it the QLThumbnailReply instance.
- QuickLook uses the QLThumbnailReply instance to run your drawing code.
A closure is combination of function and state data, so when QuickLook runs the drawing code, the drawing code has access to the all data you generated in provideThumbnail(). This is important because you don’t know when your drawing code will be called. There’s a lot of clever memory management going on behind the scenes to ensure that, for example, the NSBitmapImageRep is kept available for the drawing code to (eventually) use.
Again this is all highly asynchronous, which makes debugging hard. Don’t expect to do this through Xcode; NSLog() is your friend here.
As we saw with the file preview app extension, you also need to set the Thumbnailer’s
info.plist
to indicate what file types your extension can work with. These types are specified as URIs. The plist already has an NSExtension entry with an NSExtensionAttributes dictionary. One of the dictionary entries is QLSupportedContentTypes, which has an array value: double-click this value (“0 items”) to begin adding strings for each of your app’s UTIs.If you’re running Catalina, you can try this out by downloading and installing my app PreviewMarkdown, which you can find here. The source code is available over at GitHub.
Whether you’ve just taken a weekend trip up North or the European vacation of your dreams, you’re guaranteed to return home with a massive amount of photos, probably a handful of videos, and, if you were feeling particularly artsy, half a dozen time-lapses.
Show Thumbnails In Pictures
But now that you’re home, what are you going to do with all those pictures? Where are you going to keep them? How are you going to share them?
Enter the Photos app for Mac.
What is Photos on Mac?
The Photos app is a convenient home for all of your pictures and videos. Anything you shoot, Photos will store it and — better yet — organize it, so you can actually find said pictures when you feel like reliving the memories.
In this post, we’ll go over the basics of using Apple’s Photos app. We’ll talk about where to find photos on your Mac and how you can manage your ever-growing photo library. And of course, we’ll cover all the features Apple has built into this underrated app.
iPhoto vs Photos: What’s the difference?
Those of you familiar with iPhoto for Mac are probably wondering what makes its successor so special. And to oversimplify it, Photos is the next step in photo management — and a giant step at that.
Prior to Photos, Apple made two apps for managing pictures and videos. iPhoto, for those of us less experienced in photography, and Aperture, for the ones looking to do some heavier editing. Photos perfectly blurs the line between those two apps, combining the best of both while adding new features like iCloud Photo Library and iCloud Photo Sharing.
If you used iPhoto before, Photos will feel instantly recognizable. You’ll have your pictures, albums, and collections in the main window, a navigation sidebar to the left, and different viewing options at the top. However, a significant point of difference between iPhoto and Photos is the app’s performance. When working with larger libraries, iPhoto had the tendency to lag or choke up and had arbitrary limits that would restrict album and collection sizes. Photos gets rid of those limitations entirely and is able to handle much larger libraries than its predecessor. While the look of Photos may be the same, it feels like a faster and more powerful app.
Where are the photos stored on Mac?
The Photos app maintains pictures and videos in its own library, making it easy to view the content, but confusing to access the actual files. To find the photos on your Mac, you’ll need to find that Photos Library first:
- With the Photos app open, click on Photos in the menu bar
- Then go to Preferences > General
- At the top of the window, you’ll see Library Location. Click the Show in Finder button.
The first thing you’ll notice after you find the Photos Library file is you can’t do much with it. You can double-click it, but that opens Photos again. If you want to find the original files of your pictures and videos, you’ll need to:
- Right-click on Photos Library to open the alternate menu
- Select Show Package Contents from that menu
- Open the Masters folder
- All of your pictures and videos live in this folder, organized by year, month, and date
TIP:
If you only need master files for a few pictures, you can drag them out of the Photos app directly onto your desktop. Doing this will create copies of the pictures and won’t move or delete the original files. Just don’t forget to find and delete all the copies later, so they don't turn your Mac into a mess. A duplicate finder like Gemini 2 can help with that.
If you only need master files for a few pictures, you can drag them out of the Photos app directly onto your desktop. Doing this will create copies of the pictures and won’t move or delete the original files. Just don’t forget to find and delete all the copies later, so they don't turn your Mac into a mess. A duplicate finder like Gemini 2 can help with that.
How to use Apple’s Photos app
When you open Photos for the first time, the app offers you a glimpse of what your library will look like with all your pictures and videos imported. You get a quick intro to some of the features and tools, and learn how you can make these memories tangible through printed objects like calendars, photo books, and more.
Once you’ve finished the tour of the app and gone through the initial setup, you’re all set to start importing your pictures and videos!
How to import photos to Mac
There are several ways you can import your media content to Photos, depending on where you’ve been storing it.
From your iPhone or a digital camera
- Connect your iPhone or camera to your Mac with a USB cable. You might need to unlock your iPhone with your passcode, and then tap Trust when prompted to Trust This Computer.
- On your Mac, if the Photos app doesn’t open automatically, go ahead and open it.
- The Photos app will show you an Import screen that has all the photos and videos on your iPhone or camera. If you don’t see the Import screen, click on your iPhone or camera in the Photos sidebar under Devices.
- From here you can either choose to Import All New Items or select a batch and click Import Selected.
From a folder or an external hard drive in Finder
You have a couple of options here. If your pictures and videos live on an external hard drive, you’ll want to make sure it’s connected first. Then, you’ll want to do one of the following:
- Drag the files from your drive into the Photos window
- Drag the files from your drive onto the Photos icon in the Dock
- In Photos, go to File > Import from the menu bar. Choose the photos or videos you want to import and click Review for Import.
An important thing to know about Photos is that the app copies the pictures and videos into the Photos Library we talked about earlier, leaving the original file either on your device or in its folder.
TIP:
Because Photos doesn’t remove the original picture after you import, you may end up with duplicate pics taking up precious space on your Mac. And if you’ve taken multiple photos of the same thing from slightly different angles, those will waste even more storage. To keep your photo collection lean, scan your Mac for duplicates from time to time. Gemini 2 can help you find and delete duplicate and even similar photos, so you don’t have to go through hundreds of photos manually. Download it for free and try it out.
Because Photos doesn’t remove the original picture after you import, you may end up with duplicate pics taking up precious space on your Mac. And if you’ve taken multiple photos of the same thing from slightly different angles, those will waste even more storage. To keep your photo collection lean, scan your Mac for duplicates from time to time. Gemini 2 can help you find and delete duplicate and even similar photos, so you don’t have to go through hundreds of photos manually. Download it for free and try it out.
Tabs in Photos: Library, Albums, Projects
Macos Photos Folder
Have you ever been unable to find a specific picture because you couldn’t remember when you took it? You can remember everything else about the photo, things like where it was taken and who was in it, but not the one thing you need to navigate your files.
The Photos app helps you with this predicament by organizing your pictures not only by date, but also by event, location, and even by people’s faces. In the sidebar, you’ll find a number of tabs designed to make sorting through your pictures easier.
Memories. Photos creates “memories” based on who is in a series of images as well as when and where those pictures were taken.
Favorites. These are the pictures you’ve gone through and clicked the heart icon on, marking them as your favorites.
People. This is where you’ll be able to see all the pictures of you have of specific people.
Places. This is where you can see all the pictures you’ve taken in specific locations.
Shared. This section is where you’ll find all the albums you’ve shared with other people and the albums that have been shared with you. (Check out our guide to iCloud Photo Sharing for more info on Shared Albums.)
Albums. If you want to group certain pictures for easy navigation, you’ll want to create a new album. This section is where you can access those albums.
How to tag people in photos
If you want to tag someone in a specific picture:
- Open the photo in the Photos app
- Click the info button in the top right corner.
- At the bottom of the info window, you’ll see circles with faces at the bottom. Tap on one of those.
- The face will now be circled on the photo. Underneath the circle will be a text box labeled “unnamed.” Click on the text box and type the person’s name.
If the person you’re tagging has already been tagged in your Library, their name should appear under the circle on the photo.
How to share pictures from the Photos app
The Photos app on Mac has made it easier than before to share your pictures. Just select the photos you want to share and click on the Share button in the top right-hand corner. You’ll see a list of options:
- Shared Albums
- AirDrop
- Messages
- Notes
- and more, depending on what apps and accounts you set up on your Mac
![Macos Photos.app Show Thumbnails Macos Photos.app Show Thumbnails](/uploads/1/3/4/1/134136313/846744783.jpg)
Tap on your preferred option and proceed to send the pic or create a Shared Album.
This might be helpful: How to edit photos with Mac's native image editors
Now that you’ve gotten a feel for how to use Photos on Mac, it’s time to give it a spin. Once you’ve got your library set up and organized, you’ll see how easy it is to relive and share your memories with Photos.