It's not quite as simple, because UTIs aren't properties of an NSURL, so you can't use a predicate on an array of URLs.
What you need to do is get the URLs, then build an array of dictionaries -- a list of records, in AppleScript terms -- where each record contains the URL plus its UTI. Then you can use a predicate to filter based on the UTI.
Because getting the UTIs involves a repeat loop, it makes sense to do that only once, in its own handler. So something like this:
use AppleScript version "2.4" -- Yosemite (10.10) or later
use framework "Foundation"
use scripting additions
set sourceFolder to POSIX path of (path to desktop folder)
set theFileInfo to my listFilesAndUTIsIn:sourceFolder
set theResult to my filterArray:theFileInfo conformingTo:"public.image"
on listFilesAndUTIsIn:sourceFolder
set fileManager to current application's NSFileManager's defaultManager()
set aURL to current application's |NSURL|'s fileURLWithPath:sourceFolder
set directoryContents to fileManager's contentsOfDirectoryAtURL:aURL includingPropertiesForKeys:{} options:0 |error|:(missing value)
set tempArray to current application's NSMutableArray's arrayWithCapacity:(directoryContents's |count|()) -- array to hold values
repeat with aURL in directoryContents
set {theResult, theUTI} to (aURL's getResourceValue:(reference) forKey:(current application's NSURLTypeIdentifierKey) |error|:(missing value))
(tempArray's addObject:(current application's NSDictionary's dictionaryWithObjects:{aURL, theUTI} forKeys:{"theURL", "theUTI"}))
end repeat
return tempArray
end listFilesAndUTIsIn:
on filterArray:tempArray conformingTo:someUTI
set thePredicate to current application's NSPredicate's predicateWithFormat_("theUTI UTI-CONFORMS-TO %@", someUTI)
set foundItemList to (tempArray's filteredArrayUsingPredicate:thePredicate)'s valueForKey:"theURL"
# Return as a list of «class furl»'s
return foundItemList as list
# Return as a list of POSIX Paths
# set foundItemList to (foundItemList's valueForKey:"path") as list
# return foundItemList
end filterArray:conformingTo: