How do i add an image to the preset?
I am editing the docker-compose file to include my own preset.
i managed to get it working with
- VITE_QR_CODE_PRESETS={"name":"TBFC","data":"https://mylink.com","width":400,"height":400,"margin":0,"dotsOptions":{"color":"#1c2353","type":"square"},"cornersSquareOptions":{"color":"#64c5c4","type":"extra-rounded"},"cornersDotOptions":{"color":"#cb1f6d","type":"dot"},"imageOptions":{"margin":8},"qrOptions":{"errorCorrectionLevel":"Q"},"style":{"borderRadius":"10px","background":"#ffffff"}}]
But, i cannot manage to add the image (logo) to the preset.
Whenever i try to add the base64 encoded image, the string is way too long and breaks my compose file
@yurividal is it possible for you to use a more compressed image so that the string is shorter? Otherwise image urls should work too if your url is permanent
@yurividal is it possible for you to use a more compressed image so that the string is shorter? Otherwise image urls should work too if your url is permanent
Its already a prety small image...
I have also tried hosting it online, like this:
services:
mini-qr:
container_name: mini-qr
restart: unless-stopped
ports:
- 8812:8080
build:
context: .
dockerfile: Dockerfile
args:
BASE_PATH: ${BASE_PATH:-/}
VITE_HIDE_CREDITS: ${HIDE_CREDITS:-false}
VITE_DEFAULT_PRESET: ${DEFAULT_PRESET:-}
VITE_DEFAULT_DATA_TO_ENCODE: ${DEFAULT_DATA:-}
VITE_QR_CODE_PRESETS: >
[ {
"name": "MYQRCODE",
"data": "https://mylink.com",
"width": 400,
"height": 400,
"margin": 0,
"dotsOptions": { "color": "#1c2353", "type": "square" },
"cornersSquareOptions": { "color": "#64c5c4", "type": "extra-rounded" },
"cornersDotOptions": { "color": "#cb1f6d", "type": "dot" },
"imageOptions": { "margin": 8 },
"qrOptions": { "errorCorrectionLevel": "Q" },
"style": { "borderRadius": "10px", "background": "#ffffff" },
"image": "https://static.wixstatic.com/media/a18e59_a95e46776aaa440ea942b4e9dda0b403~mv2.png"
} ]
VITE_FRAME_PRESET: ${FRAME_PRESET:-}
VITE_FRAME_PRESETS: ${FRAME_PRESETS:-}
VITE_DISABLE_LOCAL_STORAGE: ${DISABLE_LOCAL_STORAGE:-false}
But this still doesn't work. I build the image again with docker compose build, and docker compose up -d , but still, when i open the page, i only see a default, blank template
can you try setting VITE_DISABLE_LOCAL_STORAGE=true?
more info here if this does help with the issue: https://github.com/lyqht/mini-qr#environment-variables
Stale