Skip to content

Commit a6c0c67

Browse files
authored
[DEV-19805] Mark uncompressed files & images URL with `nofollow`
2 parents 6fcd435 + b505ca3 commit a6c0c67

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

src/components/Lightbox/Lightbox.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,9 @@ export function Lightbox({
130130
<div className="prezly-slate-lightbox__actions">
131131
<a
132132
className="prezly-slate-lightbox__download"
133+
download
133134
href={image.downloadUrl}
134-
rel="noreferrer noopener"
135+
rel="nofollow noreferrer noopener"
135136
target="_blank"
136137
title="Download full-size"
137138
onClick={() => onDownload(image)}
@@ -141,7 +142,7 @@ export function Lightbox({
141142

142143
<PinterestButton
143144
className="prezly-slate-lightbox__pinterest"
144-
image={image.downloadUrl}
145+
image={previewImage(image).cdnUrl}
145146
/>
146147
</div>
147148
</div>

src/components/Rollover/Rollover.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export function Rollover({
4242
return (
4343
<a
4444
className={classNames('prezly-slate-image-rollover', className)}
45-
onClick={function (event) {
45+
onClick={(event) => {
4646
event.preventDefault();
4747
onClick();
4848
}}

src/elements/Attachment/Attachment.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ export function Attachment({ className, node, ...props }: Props) {
2121
<a
2222
id={`attachment-${file.uuid}`}
2323
className={classNames('prezly-slate-attachment', className)}
24+
download
2425
href={attachment.downloadUrl}
26+
rel="nofollow"
2527
{...props}
2628
>
2729
<div className="prezly-slate-attachment__content">

0 commit comments

Comments
 (0)