How to use chrome.storage in a chrome extension using a variable's value as the key name?
Use a named object, not an anonymous object, and set a member variable using square brackets:
var dataObj = {};
dataObj[imageName] = myDescription;
chrome.storage.local.set(dataObj, function() { /*...*/ });
It's not the most elegant looking code, but it's the only way to do it.
In ES6, a slightly shorter approach is to use an object literal with a dynamic property name:
chrome.storage.local.set({
[imageName]: myDescription
}, function() { /*...*/ });