Not a developer? Go to MovableType.com

Documentation

AssetFileTypes

This is documentation about a configuration directive, which can be placed within Movable Type’s core configuration file, mt-config.cgi, to customize the behavior of the system.

Define new extensions to be handled as specific asset types in the core product.

Any type of document may used generically as an asset in Movable Type; assets with specific file extensions are treated differently. Assets with specific file extensions can be processed differently that other documents. Documents with extensions of gif, png, jpg, jpeg are images and can be resized, rotated, etc. and are added differently in html than say a pdf document, a mp3 audio file, or a flv video file.

If a brand, new audio format comes out — .dog — and you want it to be treated just like your ogg, mp3, aac and other audio asset files, all you have to do is add a single configuration directive.

AssetFileTypes MT::Asset::Audio=dog

The “dog” extension is combined with the other supported file extensions internally and treated exactly the same as they are.

You can of course add multiples separated by commas (optionally space characters can be placed on each side of the comma).

AssetFileTypes MT::Asset::Audio=dog,dok, do3, do2 ,ddt,dig,dub

You can re-use the same configuration directive for a different asset subclass, MT::Asset::Video for example.

AssetFileTypes MT::Asset::Audio=dog,dok,do3,do2,ddt
AssetFileTypes MT::Asset::Video=flv,swf,moob

When the using AssetFileTypes config directive, you must specify a valid MT::Asset subclass or else it will be ignored. Ask your local friendly developer if you have no idea what that means.

Note: Note: Depending upon the file type being added, additional updates to the MT app or blog templates may be necessary.

Default

As of version MT4.261, the following asset types are supported by the core product:

MT::Asset::Audio

  • aac
  • aif
  • aiff
  • flac
  • m4a
  • mp3
  • ogg
  • wav
  • wma

MT::Asset::Image

  • gif
  • jpeg
  • jpg
  • png

MT::Asset::Video

  • 3gp
  • asf
  • asx
  • avi
  • flv
  • mkv
  • mov
  • mp4
  • mpg
  • ogm
  • qt
  • wmv

Values

An asset class name followed by an equals sign and then a comma-delimited list of file extensions.

AssetFileTypes ASSETCLASS=EXT1, EXT2, EXT3
  • The MT::Asset subclass is separated from the values by an equals sign
  • The file extensions are separated by comma. Optionally space characters can be placed on each side of the comma.
  • Don’t put a period in front of the file extension. That’s silly.

Example

AssetFileTypes MT::Asset::Image=bmp, mng, pict, psd, tif
AssetFileTypes MT::Asset::Audio=iff, midi, mpa
AssetFileTypes MT::Video::Video=3g2, rm, swf
Back

Leave a Comment