import React from 'react';
import Img from 'react-optimized-image';
import useTranslation from 'next-translate/useTranslation';
const Index = () => {
const { t } = useTranslation();
return (
<div>
<Img src={require(`../public/images/${t('common:connect-all-data-sources-image')}`)} />
</div>
)
}
but i get some errors:
(node:21318) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 uncaughtException listeners added to [process]. Use emitter.setMaxListeners() to increase limit
(Use `node --trace-warnings ...` to show where the warning was created)
(node:21318) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 unhandledRejection listeners added to [process]. Use emitter.setMaxListeners() to increase limit
Is it possible to use this package to optimize images with the localization package? If yes, tell me another way, what I am doing wrong, but if not, I would like to understand the reason, because this is what communities of programmers are for.
I'm tried require image with locale file in json RU file with locales
EN file with locales
/pages/index.jsx
but i get some errors:
Is it possible to use this package to optimize images with the localization package? If yes, tell me another way, what I am doing wrong, but if not, I would like to understand the reason, because this is what communities of programmers are for.
Thank you in advance for answering