@classmethod<EOL><INDENT>def get_size(cls, value):<DEDENT>
sizes = {<EOL>'<STR_LIT>': (<NUM_LIT>, <NUM_LIT>),<EOL>'<STR_LIT>': (<NUM_LIT>, <NUM_LIT>),<EOL>'<STR_LIT>': (<NUM_LIT>, <NUM_LIT>),<EOL>'<STR_LIT>': (<NUM_LIT>, <NUM_LIT>),<EOL>'<STR_LIT>': (<NUM_LIT>, <NUM_LIT>),<EOL>}<EOL>value = value or cls.default_size<EOL>if value in sizes:<EOL><INDENT>return sizes[value]<EOL><DEDENT>try:<EOL><INDENT>size = cls.re_size.match(value)<EOL>return size.group('<STR_LIT:width>'), size.group('<STR_LIT>')<EOL><DEDENT>except AttributeError:<EOL><INDENT>raise TemplateSyntaxError(<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'.format(sizes='<STR_LIT:U+002CU+0020>'.join(sizes.keys()))<EOL>)<EOL><DEDENT>
Predefined sizes:

======== ======== =========
size     width    height
======== ======== =========
tiny     420      315
small    480      360
medium   640      480
large    960      720
huge     1280     960
======== ======== =========

You can also use custom size - in format ``WIDTHxHEIGHT``
(eg. ``500x400``).

:type value: str

:return: Returns tuple with (width, height) values.
:rtype: tuple[int, int]