Open
Description
Is there an existing issue for this?
- I have searched the existing issues.
Is this a problem caused by your code, or is it specifically because of the library?
- I have double-checked my code carefully.
Describe the bug.
send image rendering blured, but will be ok when reload web page
Expected Behavior
should rendering image fine after send image.
Steps to Reproduce the Bug or Issue
- add this js script to project root directory. just name it playground.js
const { Client, LocalAuth, MessageMedia } = require('./index');
const path = require('path');
const os = require('os');
const getChromeUserDataDir = () => {
const homePath = os.homedir();
return path.join(homePath, 'AppData', 'Local', 'Google', 'Chrome', 'User Data');
};
console.log(getChromeUserDataDir());
// Create a new client instance
const client = new Client({
authStrategy: new LocalAuth(),
puppeteer: {
headless: false,
executablePath: 'C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe',
// userDataDir: path.join(__dirname, 'whatsapp-session'),
args: ['--no-sandbox', '--disable-setuid-sandbox'],
// userDataDir: getChromeUserDataDir()
}
});
// When the client is ready, run this code (only once)
client.once('ready', () => {
console.log('Client is ready!');
client.getContacts().then(contacts => {
console.log(contacts);
});
});
// When the client received QR-Code
client.on('qr', (qr) => {
console.log('QR RECEIVED', qr);
});
client.on('message_create', (message) => {
if (message.body === 'send') {
const media = MessageMedia.fromFilePath(path.join(__dirname, 'testdata', 'myimage.png'));
client.sendMessage('[email protected]', media, {
caption: 'Hi!'
});
}
});
// Start your client
client.initialize();
- add a new image to {projectFolder}/testdata/myimage.png
- run
node playground.js
- send a text
send
to any people. - you should see the problem
WhatsApp Account Type
Standard
Browser Type
Chrome 137.0.7151.70
Operation System Type
windows 11 x64 24h2
Phone OS Type
other
WhatsApp-Web.js Version
1.30.1-alpha.3
WhatsApp Web Version
2.3000.1023918144
Node.js Version
v22.16.0
Authentication Strategy
LocalAuth
Additional Context
other similar issue(not fix) #2033