the-dataface / figma2html

Export Figma frames as responsive HTML and CSS
https://www.figma.com/community/plugin/1109185297790825980/figma2html
MIT License
48 stars 8 forks source link

Option to Base64 encode images #74

Open sawyerclick opened 1 year ago

sawyerclick commented 1 year ago

Add an option to inline images. Would get a little chaotic, but would be a nice feature. Curious if users want this.

Ex:

<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKoAAACqCAIAAACyFEPVAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAEKNJREFUeNrsXU1sFEcWHvAP2AZzYIBFYKIFpBgwEjhKIAiEVzYxh8X8WIkEKBuihEMuJhKSESF7Wli0OQEXVjJSvIocJCJIcC4xYGmj8GOCMJEIOEgBtP5REmMONrYD2Ib9uh/09s50V1d3Vff04PdpNBrwTFd1fa9evffq1esJC/78lwRjvGIiDwHTz2D6GUw/g+lnMP0Mpp/B9DOYfgbTz2D6GUw/g+lnMP0Mpp/B9DOYfgbTz2D6GUw/g+lnMP0Mpp/B9DOYfgbTz2D6GUw/g+lnMP0Mpp/B9DOYfgbTz2D6GUw/g+lnxI7+RfPnNf19Lz7UVq7+eOd2HtmsQK6uCxUXFa5YWooPc2bNWPTHeX5FBz93/NPA0HDHnU7mKSRM0FXX7+ev/0Ufjhz/CgrAkIOZyZ7evu17D3b39tVt27yj5g1wDC7rDzekMAq1QaKTjsvXf9r+0cE4jBR6SOrNEQs3vDOulf/+hia8E1Ug/tPTLR8cOIzPIB4DV7d104GGpor3dnfc7fznvl087V405Q9eabKuWLoIk76x+Yw5YxZhIcA7dPiWyjV4QQFAOKDtWaW/UPTb0f1bn7Vy04cHQ8NHjn9JJsKi+S/1PP8C48V3/M62XcWMr61cM3dmsm7r5hVlpZZYMF4Q+sEoND8+9Px2jxYC6zP0PGyCqUWFUP5nL7eTTcB4sdZ+k2N8ONl6PoGXCeszJIOEgzHulD9jfJl+GQGMynUry2FXwtcwDcx5pHWM9x9/OnXuu+7e+Nqb8I0zEuAKkX4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