# Kupu Resource Types

While libraries provide abstract locations for objects of any type, Kupu distinguishes objects by resource type. For example, a user might request a library showing objects to link to or a library showing objects to be inserted into a document. The abstract location (library) might be the same, but the former library would contain documents, the latter images.

This management screen allows you to define resource types using a list of portal types. A special resource type, `collection`, identifies portal types that are to be treated as collections. The resource type `containsanchors` is used to list types which may contain HTML anchors.

Also on this screen are urls for each type which can be previewed as an image. The expression may use `object_url` and `portal_type`, but should not attempt to access the object directly. The resulting URL should ideally return an image no larger than 128 pixels square.

Map resource types

Map resource types
| use this entry to add a new resource
| Resource |
| Portal Types |
| New types |
| specify a resource type to be used for reference fields with an empty list of allowed types
| Default resource |

Action URLs
| Type | URL
--- | --- | ---
|  | preview |
Normal image |
fieldname |
default scale |
classes |
type |
|  | preview |
Normal image |
fieldname |
default scale |
classes |
type |
`Preview` is an expression to use for the preview image in the drawer [default is no preview]. `Normal image` is an expression to use for the normal view of a mediaobject [string:$object_url]. `Fieldname` is the name of the field to use for scaled variants of the mediaobject [image]. `Classes` is a list of classnames which may be selected when inserting the object as media. `Type` controls whether kupu inserts an img tag or an object tag to embed flash.