I would say create a temporary table, populate it with unique entries of 'img, wipe the old table clean, and then re-insert the non-duplicated data. You'd execute queries like this:
CREATE TEMPORARY TABLE `img_temp`
SELECT * FROM `img` GROUP BY `img`;
DELETE FROM `img`;
INSERT INTO `img` SELECT * FROM `img_temp`;
Though, you're right, an ALTER IGNORE TABLE syntax would work as well:
ALTER IGNORE TABLE `img` ADD UNIQUE INDEX `img` (`img`);