protected function updateAsset($asset, $image, $path) { // Update our model $asset->size = IOHelper::getFileSize($path); $asset->width = $image->getWidth(); $asset->height = $image->getHeight(); // Then, make sure we update the asset info as stored in the database $fileRecord = AssetFileRecord::model()->findById($asset->id); $fileRecord->size = $asset->size; $fileRecord->width = $asset->width; $fileRecord->height = $asset->height; $fileRecord->dateModified = IOHelper::getLastTimeModified($path); $fileRecord->save(false); }