code: public function setMultiSrcFlags($varValue, Contao\DataContainer $dc)
  	{
  		if ($dc->activeRecord && $dc->activeRecord->type == 'randomImage')
  		{
  			$GLOBALS['TL_DCA'][$dc->table]['fields'][$dc->field]['eval']['isGallery'] = true;
  			$GLOBALS['TL_DCA'][$dc->table]['fields'][$dc->field]['eval']['extensions'] = Contao\Config::get('validImageTypes');
  		}
  
  		return $varValue;
  	}
docs: Dynamically add flags to the "multiSRC" field
  
  @param mixed                $varValue
  @param Contao\DataContainer $dc
  
  @return mixed