mirror of
https://github.com/privacyguides/i18n.git
synced 2025-08-28 17:09:16 +00:00
96 lines
3.3 KiB
Markdown
96 lines
3.3 KiB
Markdown
---
|
||
title: Uploading Images
|
||
description: A guide for website contributors on uploading images in the proper format and location.
|
||
---
|
||
|
||
If you make changes to this website that involve adding new images or replacing existing ones, here are a couple of general recommendations:
|
||
|
||
## Εικόνες
|
||
|
||
- We **prefer** SVG images, but if those do not exist we can use PNG images. Additionally, for cover images, we prefer that they are obtained from [Unsplash](https://unsplash.com) and are in the WebP format.
|
||
|
||
Company logos should be square if possible, and at least 200x200px if they are PNGs (non-vector images).
|
||
|
||
## Βελτιστοποίηση
|
||
|
||
### PNG
|
||
|
||
Use the [OptiPNG](https://sourceforge.net/projects/optipng) tool to optimize PNG images:
|
||
|
||
```bash
|
||
optipng -o7 file.png
|
||
```
|
||
|
||
### SVG
|
||
|
||
#### Inkscape
|
||
|
||
[Scour](https://github.com/scour-project/scour)αρε όλες τις SVG εικόνες.
|
||
|
||
Στο Inkscape:
|
||
|
||
1. File > Save As...
|
||
2. Set type to: Optimized SVG (*.svg)
|
||
|
||
Στην καρτέλα **Options**:
|
||
|
||
- **Number of significant digits for coordinates** > **5**
|
||
- [x] Ενεργοποιήστε **Shorten color values**
|
||
- [x] Ενεργοποιήστε **Convert CSS attributes to XML attributes**
|
||
- [x] Ενεργοποιήστε **Collapse groups**
|
||
- [x] Ενεργοποιήστε **Create groups for similar attributes**
|
||
- [ ] Απενεργοποιήστε **Keep editor data**
|
||
- [ ] Απενεργοποιήστε **Keep unreferenced definitions**
|
||
- [x] Ενεργοποιήστε **Work around renderer bugs**
|
||
|
||
Στην καρτέλα **SVG Output** στις επιλογές εγγράφου ****:
|
||
|
||
- [ ] Απενεργοποιήστε **Remove the XML declaration**
|
||
- [x] Ενεργοποιήστε **Remove metadata**
|
||
- [x] Ενεργοποιήστε **Remove comments**
|
||
- [x] Turn on **Embedded raster images**
|
||
- [x] Ενεργοποιήστε **Enable viewboxing**
|
||
|
||
Στην καρτέλα **SVG Output** στις επιλογές εγγράφου **Pretty-printing**:
|
||
|
||
- [ ] Απενεργοποίηση της επιλογής **Format output with line-breaks and indentation**
|
||
- **Indentation characters** > Επιλέξτε **Space**
|
||
- **Depth of indentation** > **1**
|
||
- [ ] Απενεργοποιήστε **Strip the "xml:space" attribute from the root SVG element**
|
||
|
||
Στην καρτέλα **IDs**:
|
||
|
||
- [x] Ενεργοποιήστε **Remove unused IDs**
|
||
- [ ] Απενεργοποιήστε **Shorten IDs**
|
||
- **Prefix shortened IDs with** > `αφήστε το κενό`
|
||
- [x] Ενεργοποιήστε **Preserve manually created IDs not ending with digits**
|
||
- **Preserve the following IDs** > `αφήστε το κενό`
|
||
- **Preserve IDs starting with** > `αφήστε το κενό`
|
||
|
||
#### CLI
|
||
|
||
Το ίδιο μπορεί να επιτευχθεί με την εντολή [Scour](https://github.com/scour-project/scour):
|
||
|
||
```bash
|
||
scour --set-precision=5 \
|
||
--create-groups \
|
||
--renderer-workaround \
|
||
--remove-descriptive-elements \
|
||
--enable-comment-stripping \
|
||
--enable-viewboxing \
|
||
--indent=space \
|
||
--nindent=1 \
|
||
--no-line-breaks \
|
||
--enable-id-stripping \
|
||
--protect-ids-noninkscape \
|
||
input.svg output.svg
|
||
```
|
||
|
||
### WebP
|
||
|
||
Use the [cwebp](https://developers.google.com/speed/webp/docs/using) command to convert PNG or JPEG image files to WebP format:
|
||
|
||
```bash
|
||
cwebp -q 70 -m 6 input_file -o output.webp
|
||
```
|