@jjlmoya/utils-converters 1.25.0 → 1.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/category/i18n/de.ts +1 -1
- package/src/category/i18n/en.ts +1 -1
- package/src/category/i18n/fr.ts +1 -1
- package/src/category/i18n/id.ts +1 -1
- package/src/category/i18n/it.ts +1 -1
- package/src/category/i18n/nl.ts +1 -1
- package/src/category/i18n/pl.ts +1 -1
- package/src/category/i18n/pt.ts +1 -1
- package/src/category/i18n/sv.ts +1 -1
- package/src/tests/bibliography_wellformed_export.test.ts +46 -0
- package/src/tests/category_seo_quality.test.ts +74 -0
- package/src/tests/faq_count.test.ts +1 -1
- package/src/tests/no_h1_in_components.test.ts +1 -1
- package/src/tests/seo_parity.test.ts +2 -2
- package/src/tests/seo_wellformed_export.test.ts +65 -0
- package/src/tests/tool_validation.test.ts +15 -15
- package/src/tool/avifAJpg/i18n/en.ts +164 -164
- package/src/tool/avifAJpg/i18n/es.ts +164 -164
- package/src/tool/avifAJpg/i18n/fr.ts +164 -164
- package/src/tool/avifAJpg/i18n/ja.ts +166 -166
- package/src/tool/avifAJpg/i18n/ko.ts +166 -166
- package/src/tool/avifAJpg/i18n/zh.ts +166 -166
- package/src/tool/avifAJpg/seo.astro +15 -15
- package/src/tool/avifAPng/i18n/en.ts +164 -164
- package/src/tool/avifAPng/i18n/es.ts +164 -164
- package/src/tool/avifAPng/i18n/fr.ts +164 -164
- package/src/tool/avifAPng/i18n/ja.ts +166 -166
- package/src/tool/avifAPng/i18n/ko.ts +166 -166
- package/src/tool/avifAPng/i18n/zh.ts +166 -166
- package/src/tool/avifAPng/seo.astro +15 -15
- package/src/tool/avifAWebp/i18n/en.ts +164 -164
- package/src/tool/avifAWebp/i18n/es.ts +164 -164
- package/src/tool/avifAWebp/i18n/fr.ts +164 -164
- package/src/tool/avifAWebp/i18n/ja.ts +166 -166
- package/src/tool/avifAWebp/i18n/ko.ts +166 -166
- package/src/tool/avifAWebp/i18n/zh.ts +166 -166
- package/src/tool/avifAWebp/seo.astro +15 -15
- package/src/tool/bmpAJpg/i18n/en.ts +164 -164
- package/src/tool/bmpAJpg/i18n/es.ts +164 -164
- package/src/tool/bmpAJpg/i18n/fr.ts +164 -164
- package/src/tool/bmpAJpg/i18n/ja.ts +166 -166
- package/src/tool/bmpAJpg/i18n/ko.ts +166 -166
- package/src/tool/bmpAJpg/i18n/zh.ts +166 -166
- package/src/tool/bmpAJpg/seo.astro +15 -15
- package/src/tool/bmpAPng/i18n/en.ts +164 -164
- package/src/tool/bmpAPng/i18n/es.ts +164 -164
- package/src/tool/bmpAPng/i18n/fr.ts +164 -164
- package/src/tool/bmpAPng/i18n/ja.ts +165 -165
- package/src/tool/bmpAPng/i18n/ko.ts +165 -165
- package/src/tool/bmpAPng/i18n/zh.ts +165 -165
- package/src/tool/bmpAPng/seo.astro +15 -15
- package/src/tool/bmpAWebp/i18n/en.ts +164 -164
- package/src/tool/bmpAWebp/i18n/es.ts +164 -164
- package/src/tool/bmpAWebp/i18n/fr.ts +164 -164
- package/src/tool/bmpAWebp/i18n/ja.ts +166 -166
- package/src/tool/bmpAWebp/i18n/ko.ts +166 -166
- package/src/tool/bmpAWebp/i18n/zh.ts +166 -166
- package/src/tool/bmpAWebp/seo.astro +15 -15
- package/src/tool/gifAJpg/i18n/en.ts +164 -164
- package/src/tool/gifAJpg/i18n/es.ts +164 -164
- package/src/tool/gifAJpg/i18n/fr.ts +164 -164
- package/src/tool/gifAJpg/i18n/ja.ts +166 -166
- package/src/tool/gifAJpg/i18n/ko.ts +166 -166
- package/src/tool/gifAJpg/i18n/zh.ts +166 -166
- package/src/tool/gifAJpg/seo.astro +15 -15
- package/src/tool/gifAPng/i18n/en.ts +164 -164
- package/src/tool/gifAPng/i18n/es.ts +164 -164
- package/src/tool/gifAPng/i18n/fr.ts +164 -164
- package/src/tool/gifAPng/i18n/ja.ts +166 -166
- package/src/tool/gifAPng/i18n/ko.ts +166 -166
- package/src/tool/gifAPng/i18n/zh.ts +166 -166
- package/src/tool/gifAPng/seo.astro +15 -15
- package/src/tool/gifAWebp/i18n/en.ts +164 -164
- package/src/tool/gifAWebp/i18n/es.ts +164 -164
- package/src/tool/gifAWebp/i18n/fr.ts +164 -164
- package/src/tool/gifAWebp/i18n/ja.ts +166 -166
- package/src/tool/gifAWebp/i18n/ko.ts +166 -166
- package/src/tool/gifAWebp/i18n/zh.ts +166 -166
- package/src/tool/gifAWebp/seo.astro +15 -15
- package/src/tool/imagenBase64/i18n/en.ts +154 -154
- package/src/tool/imagenBase64/i18n/es.ts +154 -154
- package/src/tool/imagenBase64/i18n/fr.ts +154 -154
- package/src/tool/imagenBase64/seo.astro +15 -15
- package/src/tool/jpgAIco/seo.astro +15 -15
- package/src/tool/jpgAPng/i18n/en.ts +164 -164
- package/src/tool/jpgAPng/i18n/es.ts +164 -164
- package/src/tool/jpgAPng/i18n/fr.ts +164 -164
- package/src/tool/jpgAPng/i18n/ja.ts +166 -166
- package/src/tool/jpgAPng/i18n/ko.ts +166 -166
- package/src/tool/jpgAPng/i18n/zh.ts +166 -166
- package/src/tool/jpgAPng/seo.astro +15 -15
- package/src/tool/jpgAWebp/i18n/en.ts +164 -164
- package/src/tool/jpgAWebp/i18n/es.ts +164 -164
- package/src/tool/jpgAWebp/i18n/fr.ts +164 -164
- package/src/tool/jpgAWebp/seo.astro +15 -15
- package/src/tool/pngAIco/seo.astro +15 -15
- package/src/tool/pngAJpg/i18n/de.ts +21 -21
- package/src/tool/pngAJpg/i18n/es.ts +177 -177
- package/src/tool/pngAJpg/i18n/fr.ts +137 -137
- package/src/tool/pngAJpg/i18n/id.ts +89 -89
- package/src/tool/pngAJpg/i18n/it.ts +89 -89
- package/src/tool/pngAJpg/i18n/ko.ts +177 -177
- package/src/tool/pngAJpg/i18n/nl.ts +20 -20
- package/src/tool/pngAJpg/i18n/pl.ts +89 -89
- package/src/tool/pngAJpg/i18n/pt.ts +89 -89
- package/src/tool/pngAJpg/i18n/ru.ts +177 -177
- package/src/tool/pngAJpg/i18n/sv.ts +89 -89
- package/src/tool/pngAJpg/i18n/tr.ts +89 -89
- package/src/tool/pngAJpg/seo.astro +15 -15
- package/src/tool/pngAWebp/i18n/en.ts +164 -164
- package/src/tool/pngAWebp/i18n/es.ts +164 -164
- package/src/tool/pngAWebp/i18n/fr.ts +164 -164
- package/src/tool/pngAWebp/seo.astro +15 -15
- package/src/tool/svgAJpg/i18n/fr.ts +164 -164
- package/src/tool/svgAJpg/seo.astro +15 -15
- package/src/tool/svgAPng/i18n/fr.ts +164 -164
- package/src/tool/svgAPng/seo.astro +15 -15
- package/src/tool/webpAIco/seo.astro +15 -15
- package/src/tool/webpAJpg/seo.astro +15 -15
- package/src/tool/webpAPng/bibliography.ts +13 -13
- package/src/tool/webpAPng/i18n/de.ts +166 -166
- package/src/tool/webpAPng/i18n/es.ts +171 -171
- package/src/tool/webpAPng/i18n/fr.ts +166 -166
- package/src/tool/webpAPng/i18n/id.ts +166 -166
- package/src/tool/webpAPng/i18n/it.ts +166 -166
- package/src/tool/webpAPng/i18n/nl.ts +166 -166
- package/src/tool/webpAPng/i18n/pl.ts +166 -166
- package/src/tool/webpAPng/i18n/pt.ts +166 -166
- package/src/tool/webpAPng/i18n/ru.ts +166 -166
- package/src/tool/webpAPng/i18n/sv.ts +166 -166
- package/src/tool/webpAPng/i18n/tr.ts +167 -167
- package/src/tool/webpAPng/seo.astro +15 -15
|
@@ -1,158 +1,158 @@
|
|
|
1
1
|
import { bibliography } from '../bibliography';
|
|
2
|
-
import type { ImagenBase64LocaleContent } from '../index';
|
|
2
|
+
import type { ImagenBase64LocaleContent } from '../index';
|
|
3
3
|
import { generateSchemas } from '../../../shared/logic/schemas';
|
|
4
|
-
import type { ImageToBase64UI } from '../index';
|
|
5
|
-
|
|
6
|
-
const slug = 'image-to-base64-converter';
|
|
7
|
-
const title = 'Image to Base64 Converter Online';
|
|
8
|
-
const description =
|
|
9
|
-
'Convert any image to Base64 code and Data URI directly in your browser. No file uploads. Free, private and instant.';
|
|
10
|
-
|
|
11
|
-
const ui: ImageToBase64UI = {
|
|
12
|
-
dragTitle: 'Drag your image here',
|
|
13
|
-
dragSubtext: 'or click to browse your files',
|
|
14
|
-
formatBadge: 'Supports JPG, PNG, WEBP, SVG, GIF',
|
|
15
|
-
dataUriLabel: 'Data URI (Ready for CSS / HTML src="")',
|
|
16
|
-
base64Label: 'Base64 only (Plain encoded text)',
|
|
17
|
-
copyBtn: 'Copy',
|
|
18
|
-
dataUriPlaceholder: 'Upload an image to see the Data URI code...',
|
|
19
|
-
base64Placeholder: 'Upload an image to see the pure Base64 code...',
|
|
20
|
-
toastMessage: 'Code copied to clipboard!',
|
|
4
|
+
import type { ImageToBase64UI } from '../index';
|
|
5
|
+
|
|
6
|
+
const slug = 'image-to-base64-converter';
|
|
7
|
+
const title = 'Image to Base64 Converter Online';
|
|
8
|
+
const description =
|
|
9
|
+
'Convert any image to Base64 code and Data URI directly in your browser. No file uploads. Free, private and instant.';
|
|
10
|
+
|
|
11
|
+
const ui: ImageToBase64UI = {
|
|
12
|
+
dragTitle: 'Drag your image here',
|
|
13
|
+
dragSubtext: 'or click to browse your files',
|
|
14
|
+
formatBadge: 'Supports JPG, PNG, WEBP, SVG, GIF',
|
|
15
|
+
dataUriLabel: 'Data URI (Ready for CSS / HTML src="")',
|
|
16
|
+
base64Label: 'Base64 only (Plain encoded text)',
|
|
17
|
+
copyBtn: 'Copy',
|
|
18
|
+
dataUriPlaceholder: 'Upload an image to see the Data URI code...',
|
|
19
|
+
base64Placeholder: 'Upload an image to see the pure Base64 code...',
|
|
20
|
+
toastMessage: 'Code copied to clipboard!',
|
|
21
21
|
invalidImageAlert: 'Please upload a valid image file.',
|
|
22
|
-
bibliographyTitle: 'Bibliographic References',
|
|
23
|
-
faqTitle: 'Frequently Asked Questions',
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
const faq: ImagenBase64LocaleContent['faq'] = [
|
|
27
|
-
{
|
|
28
|
-
question: 'What is Base64 and what is it used for in web development?',
|
|
29
|
-
answer:
|
|
30
|
-
'Base64 is an encoding system that converts binary data into an ASCII text string. In web development, it is used to embed images directly within HTML or CSS files via Data URIs, reducing the number of HTTP requests to the server.',
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
question: 'Is it safe to convert my images to Base64 here?',
|
|
34
|
-
answer:
|
|
35
|
-
'Absolutely safe and private. Our tool works 100% locally in your browser. Your images are never uploaded or processed on any external server.',
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
question: 'What image formats does the Base64 converter support?',
|
|
39
|
-
answer:
|
|
40
|
-
'The tool is compatible with JPG, PNG, GIF, WebP, and even SVG vector files. When loading the image, it will automatically detect its MIME type to generate the exact Data URI code.',
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
question: 'When should I NOT use Base64 images?',
|
|
44
|
-
answer:
|
|
45
|
-
'You should avoid using Base64 images for large photographs or high-resolution images. Base64 code takes up approximately 33% more weight than the original binary file, which can excessively inflate your CSS stylesheets or HTML documents.',
|
|
46
|
-
},
|
|
47
|
-
];
|
|
48
|
-
|
|
49
|
-
const howTo: ImagenBase64LocaleContent['howTo'] = [
|
|
50
|
-
{
|
|
51
|
-
name: 'Drag or Select your Image',
|
|
52
|
-
text: 'Move any image (JPG, PNG, WebP, SVG, GIF) to the upload area to start the conversion.',
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
name: 'Copy the Generated Code',
|
|
56
|
-
text: 'You will see two textareas: the complete Data URI (ready to use in src="" or CSS) and the pure Base64 for other uses.',
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
name: 'Use the Code in your Project',
|
|
60
|
-
text: 'Paste the Data URI directly into the src of an img tag or in your CSS as background-image without needing external files.',
|
|
61
|
-
},
|
|
62
|
-
];
|
|
63
|
-
|
|
64
|
-
const seo: ImagenBase64LocaleContent['seo'] = [
|
|
65
|
-
{
|
|
66
|
-
type: 'title',
|
|
67
|
-
text: 'Image to Base64 Converter: Embed Images Without HTTP Requests',
|
|
68
|
-
level: 2,
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
type: 'paragraph',
|
|
72
|
-
html: 'Base64 is an encoding technique that transforms binary data - like an image - into a pure ASCII text string. The result is a Data URI: a self-contained URL that starts with <code>data:image/png;base64,...</code> and contains the entire encoded image. By embedding this code directly in your HTML, CSS or JSON, the image loads without any additional HTTP request to the server - zero network latency, instant loading.',
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
type: 'title',
|
|
76
|
-
text: 'When to use Base64 images',
|
|
77
|
-
level: 3,
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
type: 'paragraph',
|
|
81
|
-
html: 'The main argument for Base64 is the elimination of network requests. Every image on a web page means an HTTP request with its overhead of connection, DNS, TLS handshake and latency. For very small critical images - the main application logo, favicon, a UI icon - embedding them in Base64 in the CSS or HTML eliminates that cost and guarantees they display instantly even before the browser has cached anything.',
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
type: 'paragraph',
|
|
85
|
-
html: 'This technique is especially powerful in SPA (Single Page Application) apps where the JavaScript and CSS bundle is generated at build time: embedding small images in the bundle guarantees they load together with the code without additional requests. It is also indispensable for HTML emails, where mail clients block external images but always display embedded Data URIs.',
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
type: 'title',
|
|
89
|
-
text: 'Use cases for Base64 images',
|
|
90
|
-
level: 3,
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
type: 'list',
|
|
94
|
-
icon: 'mdi:check-circle',
|
|
95
|
-
items: [
|
|
96
|
-
'HTML inline: <code><img src="data:image/png;base64,..."></code> for critical icons.',
|
|
97
|
-
'CSS background: <code>background-image: url("data:image/svg+xml;base64,...")</code> for UI SVGs.',
|
|
98
|
-
'JSON and REST APIs: send images as text data in JSON payloads.',
|
|
99
|
-
'HTML emails: embedded images that display even when the client blocks external URLs.',
|
|
100
|
-
'SVG embedding: embed raster images inside SVG files as inline data.',
|
|
101
|
-
],
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
type: 'title',
|
|
105
|
-
text: 'How the conversion works in the browser',
|
|
106
|
-
level: 3,
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
type: 'paragraph',
|
|
110
|
-
html: 'When you select or drag an image, the browser\'s <code>FileReader</code> API reads it directly from disk as binary data in RAM. The <code>readAsDataURL()</code> method converts those binary bytes to their Base64 representation using the RFC 4648 algorithm - every 3 bytes of original data are represented as 4 ASCII characters from the Base64 alphabet. The result includes the automatically detected correct MIME type.',
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
type: 'tip',
|
|
114
|
-
title: 'Use it only for small images (under 10 KB)',
|
|
115
|
-
html: 'Base64 increases file size by approximately 33%: a 10 KB image becomes ~13.3 KB of text. For small icons and logos this cost is minimal and the elimination of the HTTP request compensates for it. For photographs or large images, the size overhead is significant - always use a CDN for large images.',
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
type: 'title',
|
|
119
|
-
text: 'When NOT to use Base64',
|
|
120
|
-
level: 3,
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
type: 'tip',
|
|
124
|
-
title: 'Avoid Base64 for large images: use a CDN instead',
|
|
125
|
-
html: 'If you have images larger than 10-20 KB, Base64 hurts performance: it inflates HTML/CSS size, prevents the browser from caching the image independently, and blocks rendering while the parser processes the giant string. For large images, always serve from a CDN with appropriate cache headers.',
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
type: 'title',
|
|
129
|
-
text: 'Compatibility and privacy',
|
|
130
|
-
level: 3,
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
type: 'paragraph',
|
|
134
|
-
html: 'Data URIs are compatible with 100% of modern browsers and most email clients. Our tool processes everything locally via the FileReader API - your images never leave your device. This makes it suitable for corporate images, private screenshots or any confidential visual content that you need to convert to Base64.',
|
|
135
|
-
},
|
|
136
|
-
{
|
|
137
|
-
type: 'title',
|
|
138
|
-
text: 'Conclusion: The fastest and most private embedding tool',
|
|
139
|
-
level: 3,
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
type: 'paragraph',
|
|
143
|
-
html: 'Converting images to Base64 is a targeted but very powerful technique when applied correctly. Use it for small, critical images where zero HTTP requests makes a difference, and avoid it for large images where a CDN always wins. With our tool, you get the Data URI in an instant, without uploading anything to any server.',
|
|
144
|
-
},
|
|
145
|
-
];
|
|
146
|
-
|
|
22
|
+
bibliographyTitle: 'Bibliographic References',
|
|
23
|
+
faqTitle: 'Frequently Asked Questions',
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const faq: ImagenBase64LocaleContent['faq'] = [
|
|
27
|
+
{
|
|
28
|
+
question: 'What is Base64 and what is it used for in web development?',
|
|
29
|
+
answer:
|
|
30
|
+
'Base64 is an encoding system that converts binary data into an ASCII text string. In web development, it is used to embed images directly within HTML or CSS files via Data URIs, reducing the number of HTTP requests to the server.',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
question: 'Is it safe to convert my images to Base64 here?',
|
|
34
|
+
answer:
|
|
35
|
+
'Absolutely safe and private. Our tool works 100% locally in your browser. Your images are never uploaded or processed on any external server.',
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
question: 'What image formats does the Base64 converter support?',
|
|
39
|
+
answer:
|
|
40
|
+
'The tool is compatible with JPG, PNG, GIF, WebP, and even SVG vector files. When loading the image, it will automatically detect its MIME type to generate the exact Data URI code.',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
question: 'When should I NOT use Base64 images?',
|
|
44
|
+
answer:
|
|
45
|
+
'You should avoid using Base64 images for large photographs or high-resolution images. Base64 code takes up approximately 33% more weight than the original binary file, which can excessively inflate your CSS stylesheets or HTML documents.',
|
|
46
|
+
},
|
|
47
|
+
];
|
|
48
|
+
|
|
49
|
+
const howTo: ImagenBase64LocaleContent['howTo'] = [
|
|
50
|
+
{
|
|
51
|
+
name: 'Drag or Select your Image',
|
|
52
|
+
text: 'Move any image (JPG, PNG, WebP, SVG, GIF) to the upload area to start the conversion.',
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: 'Copy the Generated Code',
|
|
56
|
+
text: 'You will see two textareas: the complete Data URI (ready to use in src="" or CSS) and the pure Base64 for other uses.',
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: 'Use the Code in your Project',
|
|
60
|
+
text: 'Paste the Data URI directly into the src of an img tag or in your CSS as background-image without needing external files.',
|
|
61
|
+
},
|
|
62
|
+
];
|
|
63
|
+
|
|
64
|
+
const seo: ImagenBase64LocaleContent['seo'] = [
|
|
65
|
+
{
|
|
66
|
+
type: 'title',
|
|
67
|
+
text: 'Image to Base64 Converter: Embed Images Without HTTP Requests',
|
|
68
|
+
level: 2,
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
type: 'paragraph',
|
|
72
|
+
html: 'Base64 is an encoding technique that transforms binary data - like an image - into a pure ASCII text string. The result is a Data URI: a self-contained URL that starts with <code>data:image/png;base64,...</code> and contains the entire encoded image. By embedding this code directly in your HTML, CSS or JSON, the image loads without any additional HTTP request to the server - zero network latency, instant loading.',
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
type: 'title',
|
|
76
|
+
text: 'When to use Base64 images',
|
|
77
|
+
level: 3,
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
type: 'paragraph',
|
|
81
|
+
html: 'The main argument for Base64 is the elimination of network requests. Every image on a web page means an HTTP request with its overhead of connection, DNS, TLS handshake and latency. For very small critical images - the main application logo, favicon, a UI icon - embedding them in Base64 in the CSS or HTML eliminates that cost and guarantees they display instantly even before the browser has cached anything.',
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
type: 'paragraph',
|
|
85
|
+
html: 'This technique is especially powerful in SPA (Single Page Application) apps where the JavaScript and CSS bundle is generated at build time: embedding small images in the bundle guarantees they load together with the code without additional requests. It is also indispensable for HTML emails, where mail clients block external images but always display embedded Data URIs.',
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
type: 'title',
|
|
89
|
+
text: 'Use cases for Base64 images',
|
|
90
|
+
level: 3,
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
type: 'list',
|
|
94
|
+
icon: 'mdi:check-circle',
|
|
95
|
+
items: [
|
|
96
|
+
'HTML inline: <code><img src="data:image/png;base64,..."></code> for critical icons.',
|
|
97
|
+
'CSS background: <code>background-image: url("data:image/svg+xml;base64,...")</code> for UI SVGs.',
|
|
98
|
+
'JSON and REST APIs: send images as text data in JSON payloads.',
|
|
99
|
+
'HTML emails: embedded images that display even when the client blocks external URLs.',
|
|
100
|
+
'SVG embedding: embed raster images inside SVG files as inline data.',
|
|
101
|
+
],
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
type: 'title',
|
|
105
|
+
text: 'How the conversion works in the browser',
|
|
106
|
+
level: 3,
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
type: 'paragraph',
|
|
110
|
+
html: 'When you select or drag an image, the browser\'s <code>FileReader</code> API reads it directly from disk as binary data in RAM. The <code>readAsDataURL()</code> method converts those binary bytes to their Base64 representation using the RFC 4648 algorithm - every 3 bytes of original data are represented as 4 ASCII characters from the Base64 alphabet. The result includes the automatically detected correct MIME type.',
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
type: 'tip',
|
|
114
|
+
title: 'Use it only for small images (under 10 KB)',
|
|
115
|
+
html: 'Base64 increases file size by approximately 33%: a 10 KB image becomes ~13.3 KB of text. For small icons and logos this cost is minimal and the elimination of the HTTP request compensates for it. For photographs or large images, the size overhead is significant - always use a CDN for large images.',
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
type: 'title',
|
|
119
|
+
text: 'When NOT to use Base64',
|
|
120
|
+
level: 3,
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
type: 'tip',
|
|
124
|
+
title: 'Avoid Base64 for large images: use a CDN instead',
|
|
125
|
+
html: 'If you have images larger than 10-20 KB, Base64 hurts performance: it inflates HTML/CSS size, prevents the browser from caching the image independently, and blocks rendering while the parser processes the giant string. For large images, always serve from a CDN with appropriate cache headers.',
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
type: 'title',
|
|
129
|
+
text: 'Compatibility and privacy',
|
|
130
|
+
level: 3,
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
type: 'paragraph',
|
|
134
|
+
html: 'Data URIs are compatible with 100% of modern browsers and most email clients. Our tool processes everything locally via the FileReader API - your images never leave your device. This makes it suitable for corporate images, private screenshots or any confidential visual content that you need to convert to Base64.',
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
type: 'title',
|
|
138
|
+
text: 'Conclusion: The fastest and most private embedding tool',
|
|
139
|
+
level: 3,
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
type: 'paragraph',
|
|
143
|
+
html: 'Converting images to Base64 is a targeted but very powerful technique when applied correctly. Use it for small, critical images where zero HTTP requests makes a difference, and avoid it for large images where a CDN always wins. With our tool, you get the Data URI in an instant, without uploading anything to any server.',
|
|
144
|
+
},
|
|
145
|
+
];
|
|
147
146
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
}
|
|
147
|
+
|
|
148
|
+
export const content: ImagenBase64LocaleContent = {
|
|
149
|
+
slug,
|
|
150
|
+
title,
|
|
151
|
+
description,
|
|
152
|
+
ui,
|
|
153
|
+
seo,
|
|
154
|
+
faq,
|
|
155
|
+
bibliography,
|
|
156
|
+
howTo,
|
|
157
|
+
schemas: generateSchemas({ title, description, inLanguage: 'en', faq, howTo }),
|
|
158
|
+
};
|
|
@@ -1,158 +1,158 @@
|
|
|
1
1
|
import { bibliography } from '../bibliography';
|
|
2
|
-
import type { ImagenBase64LocaleContent } from '../index';
|
|
2
|
+
import type { ImagenBase64LocaleContent } from '../index';
|
|
3
3
|
import { generateSchemas } from '../../../shared/logic/schemas';
|
|
4
|
-
import type { ImageToBase64UI } from '../index';
|
|
5
|
-
|
|
6
|
-
const slug = 'convertidor-imagen-base64';
|
|
7
|
-
const title = 'Convertidor de Imagen a Base64 Online';
|
|
8
|
-
const description =
|
|
9
|
-
'Convierte cualquier imagen a código Base64 y Data URI directamente en tu navegador. Sin subir archivos. Gratis, privado e instantáneo.';
|
|
10
|
-
|
|
11
|
-
const ui: ImageToBase64UI = {
|
|
12
|
-
dragTitle: 'Arrastra tu imagen aquí',
|
|
13
|
-
dragSubtext: 'o haz clic para explorar tus archivos',
|
|
14
|
-
formatBadge: 'Soporta JPG, PNG, WEBP, SVG, GIF',
|
|
15
|
-
dataUriLabel: 'Data URI (Listo para CSS / HTML src="")',
|
|
16
|
-
base64Label: 'Solo Base64 (Texto plano codificado)',
|
|
17
|
-
copyBtn: 'Copiar',
|
|
18
|
-
dataUriPlaceholder: 'Sube una imagen para ver el código Data URI...',
|
|
19
|
-
base64Placeholder: 'Sube una imagen para ver el código Base64 puro...',
|
|
20
|
-
toastMessage: '¡Código copiado al portapapeles!',
|
|
4
|
+
import type { ImageToBase64UI } from '../index';
|
|
5
|
+
|
|
6
|
+
const slug = 'convertidor-imagen-base64';
|
|
7
|
+
const title = 'Convertidor de Imagen a Base64 Online';
|
|
8
|
+
const description =
|
|
9
|
+
'Convierte cualquier imagen a código Base64 y Data URI directamente en tu navegador. Sin subir archivos. Gratis, privado e instantáneo.';
|
|
10
|
+
|
|
11
|
+
const ui: ImageToBase64UI = {
|
|
12
|
+
dragTitle: 'Arrastra tu imagen aquí',
|
|
13
|
+
dragSubtext: 'o haz clic para explorar tus archivos',
|
|
14
|
+
formatBadge: 'Soporta JPG, PNG, WEBP, SVG, GIF',
|
|
15
|
+
dataUriLabel: 'Data URI (Listo para CSS / HTML src="")',
|
|
16
|
+
base64Label: 'Solo Base64 (Texto plano codificado)',
|
|
17
|
+
copyBtn: 'Copiar',
|
|
18
|
+
dataUriPlaceholder: 'Sube una imagen para ver el código Data URI...',
|
|
19
|
+
base64Placeholder: 'Sube una imagen para ver el código Base64 puro...',
|
|
20
|
+
toastMessage: '¡Código copiado al portapapeles!',
|
|
21
21
|
invalidImageAlert: 'Por favor sube un archivo de imagen válido.',
|
|
22
|
-
bibliographyTitle: 'Referencias Bibliográficas',
|
|
23
|
-
faqTitle: 'Preguntas Frecuentes',
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
const faq: ImagenBase64LocaleContent['faq'] = [
|
|
27
|
-
{
|
|
28
|
-
question: '¿Qué es Base64 y para qué sirve en el desarrollo web?',
|
|
29
|
-
answer:
|
|
30
|
-
'Base64 es un sistema de codificación que convierte datos binarios en una cadena de texto ASCII. En desarrollo web, se utiliza para incrustar imágenes directamente dentro de los archivos HTML o CSS mediante Data URIs, reduciendo el número de peticiones HTTP al servidor.',
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
question: '¿Es seguro convertir mis imágenes a Base64 aquí?',
|
|
34
|
-
answer:
|
|
35
|
-
'Absolutamente seguro y privado. Nuestra herramienta funciona 100% de manera local en tu navegador. Tus imágenes nunca se suben ni se procesan en ningún servidor externo.',
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
question: '¿Qué formatos de imagen soporta el convertidor a Base64?',
|
|
39
|
-
answer:
|
|
40
|
-
'La herramienta es compatible con JPG, PNG, GIF, WebP, e incluso archivos vectoriales SVG. Al cargar la imagen, automáticamente detectará su tipo MIME para generar el código Data URI exacto.',
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
question: '¿Cuándo NO debería usar imágenes en Base64?',
|
|
44
|
-
answer:
|
|
45
|
-
'Debes evitar usar imágenes en Base64 para fotografías grandes o imágenes de alta resolución. El código Base64 ocupa aproximadamente un 33% más de peso que el archivo binario original, lo que puede inflar excesivamente tus hojas de estilo CSS o documentos HTML.',
|
|
46
|
-
},
|
|
47
|
-
];
|
|
48
|
-
|
|
49
|
-
const howTo: ImagenBase64LocaleContent['howTo'] = [
|
|
50
|
-
{
|
|
51
|
-
name: 'Arrastra o Selecciona tu Imagen',
|
|
52
|
-
text: 'Mueve cualquier imagen (JPG, PNG, WebP, SVG, GIF) al área de carga para iniciar la conversión.',
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
name: 'Copia el Código Generado',
|
|
56
|
-
text: 'Verás dos textareas: el Data URI completo (listo para usar en src="" o CSS) y el Base64 puro para otros usos.',
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
name: 'Usa el Código en tu Proyecto',
|
|
60
|
-
text: 'Pega directamente el Data URI en el src de una etiqueta img o en tu CSS como background-image sin necesidad de archivos externos.',
|
|
61
|
-
},
|
|
62
|
-
];
|
|
63
|
-
|
|
64
|
-
const seo: ImagenBase64LocaleContent['seo'] = [
|
|
65
|
-
{
|
|
66
|
-
type: 'title',
|
|
67
|
-
text: 'Convertidor de Imagen a Base64: Incrusta Imágenes Sin Peticiones HTTP',
|
|
68
|
-
level: 2,
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
type: 'paragraph',
|
|
72
|
-
html: 'Base64 es una técnica de codificación que transforma datos binarios - como una imagen - en una cadena de texto ASCII puro. El resultado es un Data URI: una URL auto-contenida que empieza por <code>data:image/png;base64,...</code> y contiene toda la imagen codificada. Al incrustar este código directamente en tu HTML, CSS o JSON, la imagen se carga sin ninguna petición HTTP adicional al servidor - cero latencia de red, carga instantánea.',
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
type: 'title',
|
|
76
|
-
text: 'Cuándo usar imágenes en Base64',
|
|
77
|
-
level: 3,
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
type: 'paragraph',
|
|
81
|
-
html: 'El principal argumento a favor de Base64 es la eliminación de peticiones de red. Cada imagen en una página web supone una petición HTTP con su overhead de conexión, DNS, handshake TLS y latencia. Para imágenes críticas muy pequeñas - el logo principal de la aplicación, el favicon, un icono de UI - incrustarlas en Base64 en el CSS o HTML elimina ese coste y garantiza que se muestren de forma instantánea incluso antes de que el navegador haya cacheado nada.',
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
type: 'paragraph',
|
|
85
|
-
html: 'Esta técnica es especialmente poderosa en aplicaciones SPA (Single Page Applications) donde el bundle JavaScript y CSS se genera en tiempo de compilación: incrustar imágenes pequeñas en el bundle garantiza que se cargan junto con el código sin peticiones adicionales. También es indispensable para emails HTML, donde los clientes de correo bloquean imágenes externas pero siempre muestran Data URIs incrustados.',
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
type: 'title',
|
|
89
|
-
text: 'Casos de uso para imágenes en Base64',
|
|
90
|
-
level: 3,
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
type: 'list',
|
|
94
|
-
icon: 'mdi:check-circle',
|
|
95
|
-
items: [
|
|
96
|
-
'HTML inline: <code><img src="data:image/png;base64,..."></code> para iconos críticos.',
|
|
97
|
-
'CSS background: <code>background-image: url("data:image/svg+xml;base64,...")</code> para SVGs de UI.',
|
|
98
|
-
'JSON y APIs REST: enviar imágenes como datos de texto en payloads JSON.',
|
|
99
|
-
'Emails HTML: imágenes incrustadas que se muestran aunque el cliente bloquee URLs externas.',
|
|
100
|
-
'SVG embedding: incrustar imágenes rasterizadas dentro de archivos SVG como datos inline.',
|
|
101
|
-
],
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
type: 'title',
|
|
105
|
-
text: 'Cómo funciona la conversión en el navegador',
|
|
106
|
-
level: 3,
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
type: 'paragraph',
|
|
110
|
-
html: 'Cuando seleccionas o arrastras una imagen, la API <code>FileReader</code> del navegador la lee directamente desde el disco como datos binarios en memoria RAM. El método <code>readAsDataURL()</code> convierte esos bytes binarios a su representación Base64 usando el algoritmo de RFC 4648 - cada 3 bytes de datos originales se representan como 4 caracteres ASCII del alfabeto Base64. El resultado incluye el tipo MIME correcto detectado automáticamente.',
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
type: 'tip',
|
|
114
|
-
title: 'Úsalo solo para imágenes pequeñas (menos de 10 KB)',
|
|
115
|
-
html: 'Base64 aumenta el tamaño del archivo en aproximadamente un 33%: una imagen de 10 KB se convierte en ~13.3 KB de texto. Para iconos y logos pequeños este coste es mínimo y la eliminación de la petición HTTP lo compensa. Para fotografías o imágenes grandes, el overhead de tamaño es significativo - usa siempre un CDN para imágenes grandes.',
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
type: 'title',
|
|
119
|
-
text: 'Cuándo NO usar Base64',
|
|
120
|
-
level: 3,
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
type: 'tip',
|
|
124
|
-
title: 'Evita Base64 para imágenes grandes: usa un CDN',
|
|
125
|
-
html: 'Si tienes imágenes de más de 10-20 KB, Base64 perjudica el rendimiento: infla el tamaño del HTML/CSS, impide que el navegador cachee la imagen de forma independiente, y bloquea el render mientras el parser procesa el string gigante. Para imágenes grandes, sirve siempre desde un CDN con headers de caché apropiados.',
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
type: 'title',
|
|
129
|
-
text: 'Compatibilidad y privacidad',
|
|
130
|
-
level: 3,
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
type: 'paragraph',
|
|
134
|
-
html: 'Los Data URIs son compatibles con el 100% de los navegadores modernos y la mayoría de clientes de email. Nuestra herramienta procesa todo localmente mediante la API FileReader - tus imágenes nunca salen de tu dispositivo. Esto la hace adecuada para imágenes corporativas, capturas de pantalla privadas o cualquier contenido visual confidencial que necesites convertir a Base64.',
|
|
135
|
-
},
|
|
136
|
-
{
|
|
137
|
-
type: 'title',
|
|
138
|
-
text: 'Conclusión: La herramienta de incrustación más rápida y privada',
|
|
139
|
-
level: 3,
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
type: 'paragraph',
|
|
143
|
-
html: 'Convertir imágenes a Base64 es una técnica puntual pero muy poderosa cuando se aplica correctamente. Úsala para imágenes pequeñas y críticas donde cero peticiones HTTP marca la diferencia, y evítala para imágenes grandes donde un CDN siempre gana. Con nuestra herramienta, obtienes el Data URI en un instante, sin subir nada a ningún servidor.',
|
|
144
|
-
},
|
|
145
|
-
];
|
|
146
|
-
|
|
22
|
+
bibliographyTitle: 'Referencias Bibliográficas',
|
|
23
|
+
faqTitle: 'Preguntas Frecuentes',
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const faq: ImagenBase64LocaleContent['faq'] = [
|
|
27
|
+
{
|
|
28
|
+
question: '¿Qué es Base64 y para qué sirve en el desarrollo web?',
|
|
29
|
+
answer:
|
|
30
|
+
'Base64 es un sistema de codificación que convierte datos binarios en una cadena de texto ASCII. En desarrollo web, se utiliza para incrustar imágenes directamente dentro de los archivos HTML o CSS mediante Data URIs, reduciendo el número de peticiones HTTP al servidor.',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
question: '¿Es seguro convertir mis imágenes a Base64 aquí?',
|
|
34
|
+
answer:
|
|
35
|
+
'Absolutamente seguro y privado. Nuestra herramienta funciona 100% de manera local en tu navegador. Tus imágenes nunca se suben ni se procesan en ningún servidor externo.',
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
question: '¿Qué formatos de imagen soporta el convertidor a Base64?',
|
|
39
|
+
answer:
|
|
40
|
+
'La herramienta es compatible con JPG, PNG, GIF, WebP, e incluso archivos vectoriales SVG. Al cargar la imagen, automáticamente detectará su tipo MIME para generar el código Data URI exacto.',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
question: '¿Cuándo NO debería usar imágenes en Base64?',
|
|
44
|
+
answer:
|
|
45
|
+
'Debes evitar usar imágenes en Base64 para fotografías grandes o imágenes de alta resolución. El código Base64 ocupa aproximadamente un 33% más de peso que el archivo binario original, lo que puede inflar excesivamente tus hojas de estilo CSS o documentos HTML.',
|
|
46
|
+
},
|
|
47
|
+
];
|
|
48
|
+
|
|
49
|
+
const howTo: ImagenBase64LocaleContent['howTo'] = [
|
|
50
|
+
{
|
|
51
|
+
name: 'Arrastra o Selecciona tu Imagen',
|
|
52
|
+
text: 'Mueve cualquier imagen (JPG, PNG, WebP, SVG, GIF) al área de carga para iniciar la conversión.',
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: 'Copia el Código Generado',
|
|
56
|
+
text: 'Verás dos textareas: el Data URI completo (listo para usar en src="" o CSS) y el Base64 puro para otros usos.',
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: 'Usa el Código en tu Proyecto',
|
|
60
|
+
text: 'Pega directamente el Data URI en el src de una etiqueta img o en tu CSS como background-image sin necesidad de archivos externos.',
|
|
61
|
+
},
|
|
62
|
+
];
|
|
63
|
+
|
|
64
|
+
const seo: ImagenBase64LocaleContent['seo'] = [
|
|
65
|
+
{
|
|
66
|
+
type: 'title',
|
|
67
|
+
text: 'Convertidor de Imagen a Base64: Incrusta Imágenes Sin Peticiones HTTP',
|
|
68
|
+
level: 2,
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
type: 'paragraph',
|
|
72
|
+
html: 'Base64 es una técnica de codificación que transforma datos binarios - como una imagen - en una cadena de texto ASCII puro. El resultado es un Data URI: una URL auto-contenida que empieza por <code>data:image/png;base64,...</code> y contiene toda la imagen codificada. Al incrustar este código directamente en tu HTML, CSS o JSON, la imagen se carga sin ninguna petición HTTP adicional al servidor - cero latencia de red, carga instantánea.',
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
type: 'title',
|
|
76
|
+
text: 'Cuándo usar imágenes en Base64',
|
|
77
|
+
level: 3,
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
type: 'paragraph',
|
|
81
|
+
html: 'El principal argumento a favor de Base64 es la eliminación de peticiones de red. Cada imagen en una página web supone una petición HTTP con su overhead de conexión, DNS, handshake TLS y latencia. Para imágenes críticas muy pequeñas - el logo principal de la aplicación, el favicon, un icono de UI - incrustarlas en Base64 en el CSS o HTML elimina ese coste y garantiza que se muestren de forma instantánea incluso antes de que el navegador haya cacheado nada.',
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
type: 'paragraph',
|
|
85
|
+
html: 'Esta técnica es especialmente poderosa en aplicaciones SPA (Single Page Applications) donde el bundle JavaScript y CSS se genera en tiempo de compilación: incrustar imágenes pequeñas en el bundle garantiza que se cargan junto con el código sin peticiones adicionales. También es indispensable para emails HTML, donde los clientes de correo bloquean imágenes externas pero siempre muestran Data URIs incrustados.',
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
type: 'title',
|
|
89
|
+
text: 'Casos de uso para imágenes en Base64',
|
|
90
|
+
level: 3,
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
type: 'list',
|
|
94
|
+
icon: 'mdi:check-circle',
|
|
95
|
+
items: [
|
|
96
|
+
'HTML inline: <code><img src="data:image/png;base64,..."></code> para iconos críticos.',
|
|
97
|
+
'CSS background: <code>background-image: url("data:image/svg+xml;base64,...")</code> para SVGs de UI.',
|
|
98
|
+
'JSON y APIs REST: enviar imágenes como datos de texto en payloads JSON.',
|
|
99
|
+
'Emails HTML: imágenes incrustadas que se muestran aunque el cliente bloquee URLs externas.',
|
|
100
|
+
'SVG embedding: incrustar imágenes rasterizadas dentro de archivos SVG como datos inline.',
|
|
101
|
+
],
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
type: 'title',
|
|
105
|
+
text: 'Cómo funciona la conversión en el navegador',
|
|
106
|
+
level: 3,
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
type: 'paragraph',
|
|
110
|
+
html: 'Cuando seleccionas o arrastras una imagen, la API <code>FileReader</code> del navegador la lee directamente desde el disco como datos binarios en memoria RAM. El método <code>readAsDataURL()</code> convierte esos bytes binarios a su representación Base64 usando el algoritmo de RFC 4648 - cada 3 bytes de datos originales se representan como 4 caracteres ASCII del alfabeto Base64. El resultado incluye el tipo MIME correcto detectado automáticamente.',
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
type: 'tip',
|
|
114
|
+
title: 'Úsalo solo para imágenes pequeñas (menos de 10 KB)',
|
|
115
|
+
html: 'Base64 aumenta el tamaño del archivo en aproximadamente un 33%: una imagen de 10 KB se convierte en ~13.3 KB de texto. Para iconos y logos pequeños este coste es mínimo y la eliminación de la petición HTTP lo compensa. Para fotografías o imágenes grandes, el overhead de tamaño es significativo - usa siempre un CDN para imágenes grandes.',
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
type: 'title',
|
|
119
|
+
text: 'Cuándo NO usar Base64',
|
|
120
|
+
level: 3,
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
type: 'tip',
|
|
124
|
+
title: 'Evita Base64 para imágenes grandes: usa un CDN',
|
|
125
|
+
html: 'Si tienes imágenes de más de 10-20 KB, Base64 perjudica el rendimiento: infla el tamaño del HTML/CSS, impide que el navegador cachee la imagen de forma independiente, y bloquea el render mientras el parser procesa el string gigante. Para imágenes grandes, sirve siempre desde un CDN con headers de caché apropiados.',
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
type: 'title',
|
|
129
|
+
text: 'Compatibilidad y privacidad',
|
|
130
|
+
level: 3,
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
type: 'paragraph',
|
|
134
|
+
html: 'Los Data URIs son compatibles con el 100% de los navegadores modernos y la mayoría de clientes de email. Nuestra herramienta procesa todo localmente mediante la API FileReader - tus imágenes nunca salen de tu dispositivo. Esto la hace adecuada para imágenes corporativas, capturas de pantalla privadas o cualquier contenido visual confidencial que necesites convertir a Base64.',
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
type: 'title',
|
|
138
|
+
text: 'Conclusión: La herramienta de incrustación más rápida y privada',
|
|
139
|
+
level: 3,
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
type: 'paragraph',
|
|
143
|
+
html: 'Convertir imágenes a Base64 es una técnica puntual pero muy poderosa cuando se aplica correctamente. Úsala para imágenes pequeñas y críticas donde cero peticiones HTTP marca la diferencia, y evítala para imágenes grandes donde un CDN siempre gana. Con nuestra herramienta, obtienes el Data URI en un instante, sin subir nada a ningún servidor.',
|
|
144
|
+
},
|
|
145
|
+
];
|
|
147
146
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
}
|
|
147
|
+
|
|
148
|
+
export const content: ImagenBase64LocaleContent = {
|
|
149
|
+
slug,
|
|
150
|
+
title,
|
|
151
|
+
description,
|
|
152
|
+
ui,
|
|
153
|
+
seo,
|
|
154
|
+
faq,
|
|
155
|
+
bibliography,
|
|
156
|
+
howTo,
|
|
157
|
+
schemas: generateSchemas({ title, description, inLanguage: 'es', faq, howTo }),
|
|
158
|
+
};
|