diff --git a/services/web/frontend/js/features/source-editor/languages/latex/completions/data/environments.ts b/services/web/frontend/js/features/source-editor/languages/latex/completions/data/environments.ts
index 2864789865..0d32962563 100644
--- a/services/web/frontend/js/features/source-editor/languages/latex/completions/data/environments.ts
+++ b/services/web/frontend/js/features/source-editor/languages/latex/completions/data/environments.ts
@@ -37,7 +37,7 @@ export const environments = new Map([
'figure',
`\\begin{figure}
\t\\centering
-\t\\includegraphics{$1}
+\t\\includegraphics[width=0.5\\linewidth]{$1}
\t\\caption{\${2:Caption}}
\t\\label{\${3:fig:enter-label}}
\\end{figure}`,
diff --git a/services/web/test/frontend/features/source-editor/components/codemirror-editor-visual.spec.tsx b/services/web/test/frontend/features/source-editor/components/codemirror-editor-visual.spec.tsx
index 161c58d1fc..dacd99b248 100644
--- a/services/web/test/frontend/features/source-editor/components/codemirror-editor-visual.spec.tsx
+++ b/services/web/test/frontend/features/source-editor/components/codemirror-editor-visual.spec.tsx
@@ -249,8 +249,8 @@ describe(' in Visual mode', function () {
cy.get('@third-line').type('path/to/image')
cy.get('@third-line').should(
- 'have.text',
- ' \\includegraphics{path/to/image}'
+ 'contain.text',
+ ' \\includegraphics[width=0.5\\linewidth]{path/to/image}'
)
// move the cursor out of the figure
@@ -258,8 +258,8 @@ describe(' in Visual mode', function () {
// Should be removed from dom when line is hidden
cy.get('.cm-content').should(
- 'not.contain',
- '\\includegraphics{path/to/image}'
+ 'not.contain.text',
+ '\\includegraphics[width=0.5\\linewidth]{path/to/image}'
)
cy.get('img.ol-cm-graphics').should('have.attr', 'src', 'path/to/image')