MenuDeutsch

K2Bridge / Guide

Keep K2 images and attachment downloads working

A K2 import moves the article text. The images and attachment files stay on the old server until you copy them. This walkthrough shows what K2Bridge writes, which folders to copy, and how to prove every file is there. The site, item numbers and file names below are fictional.

Online version: https://sidecarsoft.com/guides/k2-migration-images-attachments/

What K2Bridge writes, and what it leaves to you

Link to section

K2Bridge does not copy media. It does not copy images, attachment files or galleries. It writes references: text paths that point at files you must put on the new server yourself.

The product page lists these exclusions word for word: "Comment text, users/passwords, media files, galleries, menus, modules, templates, permissions and other extension data. Attachments become links only; copy image and attachment files separately. Old K2 URLs are not guaranteed."

Media in a K2Bridge import (K2Bridge 1.0.2 specification and package, 20 November 2026)
K2 mediaWhat K2Bridge writes into the Joomla 5 articleWhat it does not doYour job
Item imageThe Intro Image and Full Article Image fields get the paths media/k2/items/cache/{hash}_M.jpg and {hash}_XL.jpg. The hash is the MD5 of the word Image plus the K2 item ID, the name K2 itself uses.It copies no image file.Copy the folder media/k2/items/cache.
Item with no imageThe same two paths. Version 1.0.2 fills both image fields for every item, including items that had no image in K2.The files never existed, so these paths cannot work.Clear both image fields on those articles, or the pages show a broken image.
AttachmentA list of download links appended to the article text. Each link is media/k2/attachments/{file name}, with no leading slash.It copies no attachment file.Copy the folder media/k2/attachments, and check where the links resolve (see below).
Image or link inside the item textThe text as it was. The specification does not say that paths inside the text are rewritten.It does not copy the files these paths name.Copy the files, or edit the paths.
Gallery or video pluginNothing. "Galleries, video plugins, menus, modules, templates, permissions and other extension data are not migrated."It does not handle galleries.Plan galleries and video as separate work.

Use --no-attachments on the command line to leave the attachment links out. Then no attachment link is written at all.

Check direct file access

Link to section

Check article visibility and attachment access separately. Joomla viewing access levels determine who may view content such as articles. A file served directly from a public media folder can still open at its known URL without opening the article. Restricting the article or hiding its link is not proof that the file is protected.

The published K2Bridge exclusions include media files and permissions; attachments become links only. The import does not establish protected downloads. Follow the private article guide for article access, then check the file separately.

On an isolated staging copy, use a harmless fictional attachment and a fresh logged-out browser session. Open the restricted article, then paste the known attachment URL directly into the address bar. Record the intended audience and both results. Do not use confidential or customer files for this rehearsal.

Fictional visibility check - illustrative results, not a customer test
Visitor and fileArticle resultDirect file resultDecision
Guest; fictional member briefing PDF in a public media folderRestricted article does not openKnown attachment URL opens the PDFArticle restriction passes; file confidentiality fails. Stop before copying confidential files.

Stop if a confidential file opens for a guest, or if its direct-file access is unknown. Keep confidential files out of public media folders and pause their transfer or launch until a separately chosen access-controlled delivery method has been verified for guests and intended users. A working link, an obscure filename or the download attribute is not an access check.

This is a migration checklist, not a protected-download feature or a server-configuration recipe. The distinction between article and direct-file checks is an operational conclusion from Joomla content access levels and K2Bridge's stated exclusions.

Step 1: build a path sheet (fictional site)

Link to section

List every path the new site will ask for, next to the file that must answer it. The fictional old site is old.example on a Windows host. The new Joomla 5 staging site is new.example on Linux, installed in the web root. Item 1042 has an image, item 1043 has none, and item 1057 has two attachments.

Fictional path sheet: old file, path in the Joomla 5 article, file to place, expected result
RowPath in the Joomla 5 articleFile on the old serverFile to place on the new serverExpected check result and action
1. Item 1042, intro imagemedia/k2/items/cache/e5d6b2287375a08cd0c4ee7d5ab1a8fc_M.jpgmedia/k2/items/cache/e5d6b2287375a08cd0c4ee7d5ab1a8fc_M.jpgThe same path and nameThe image shows in the category list.
2. Item 1042, full imagemedia/k2/items/cache/e5d6b2287375a08cd0c4ee7d5ab1a8fc_XL.jpgmedia/k2/items/cache/e5d6b2287375a08cd0c4ee7d5ab1a8fc_XL.jpgThe same path and nameThe image shows on the article page.
3. Item 1043, no K2 imagemedia/k2/items/cache/24eb469de76283bf95760d20fb997762_M.jpg and _XL.jpgNoneNoneNot found. Clear both image fields in the article's Images and Links tab.
4. Item 1057, attachment "Venue map"media/k2/attachments/Venue-Map.PDFmedia/k2/attachments/Venue-Map.PDFmedia/k2/attachments/Venue-Map.PDF, capitals keptThe PDF downloads.
5. Item 1057, attachment "Seating plan"media/k2/attachments/seating-plan.pdfmedia/k2/attachments/Seating-Plan.pdf (renamed by hand; Windows still served it)Rename it to seating-plan.pdfNot found on Linux until the names match letter for letter.
6. Image inside the item text of 1057images/news/2019/Stage.JPGimages/news/2019/Stage.JPGimages/news/2019/Stage.JPGThe image shows. The path was never rewritten, so the folder must exist.
7. Link inside the item text of 1042https://old.example/images/flyer.pdfimages/flyer.pdfimages/flyer.pdf, then edit the link to the new siteIt works only while the old host is online. Fix it before the old host shuts down.

Rows 3, 5 and 7 are the ones that fail silently. An import report cannot find them, because the import itself did what it says.

Step 2: copy the folders as they are

Link to section
  • Copy media/k2/items/cache and media/k2/attachments from the old site root to the same paths under the new Joomla root. Keep every folder and file name unchanged.
  • Check the K2 attachments folder setting on the old site first. K2's code saves attachments to media/k2/attachments by default, but a K2 site can set another folder. K2Bridge links always point at media/k2/attachments, so copy the files there.
  • Copy every folder that the item text names, for example images/news/2019. The importer did not move these files either.
  • Copy with an archive or SFTP so the files arrive byte for byte. Compare file counts and sizes on both sides.
  • Do not move the files into the images folder unless you also edit every path. The Joomla Media manager shows "by default the images folder", so files under media/k2 do not appear there. That is expected. Joomla also warns about its Path to Files Folder option: "Changing to another path than the default 'images' may break your links."
  • Keep the old K2 originals in media/k2/items/src as an archive. K2 saves the uploaded image there and the resized copies in media/k2/items/cache. K2Bridge refers only to the cache copies.

Case-sensitive paths

Link to section

Microsoft documents the difference: "Windows file system treats file and directory names as case-insensitive." and "Linux file system treats file and directory names as case-sensitive."

On the fictional old Windows host, a link to seating-plan.pdf still found Seating-Plan.pdf. On the Linux host, the same link finds nothing. Most Joomla hosting runs on Linux, so check names letter for letter: Venue-Map.PDF and venue-map.pdf are two different files there.

Fix a mismatch on one side only. Either rename the file to match the link, or edit the link to match the file. Do not keep two copies with different capitals.

Relative URLs: where the browser really looks

Link to section

K2Bridge writes the attachment links as media/k2/attachments/{file name}, with no leading slash. That is a relative reference. RFC 3986 says relative "implies that a 'base URI' exists against which the relative reference is applied." Its own example resolves "g" against http://a/b/c/d;p?q to "http://a/b/c/g", and "/g" to "http://a/g".

For a fictional article at https://new.example/news/venue-update, the browser can therefore ask for https://new.example/news/media/k2/attachments/Venue-Map.PDF. That address does not exist. Some Joomla setups turn such paths into site-root paths before the page is sent, and some do not. Do not assume: open the article on the front end and copy the real link address of one attachment.

If the address is wrong, change the links in the article text to a root path, /media/k2/attachments/{file name}. If Joomla runs in a subfolder, put the subfolder first. Check images inside the item text the same way.

The links also carry the download attribute. MDN notes that "download only works for same-origin URLs". If you move attachments to another host, the browser opens them instead of saving them.

Step 3: find missing files before visitors do

Link to section

Run these checks on staging, after the copy and before you change DNS. Use the counts from your own path sheet.

Missing-file checks (fictional counts from the path sheet above)
CheckHowPass when
Attachment filesCount the rows in the K2 attachments table and the files in media/k2/attachments on the new serverThe counts match (in the example: 2 for item 1057)
Every path in the sheetOpen each path as a full URL on staging, on a phone and on a desktopEach one returns the file, not a not-found page (rows 1, 2, 4 and 6 in the example)
Items without an imageIn the Joomla 5 database, list the articles whose images field names a file that does not existNone remain (row 3 in the example)
Exact letter caseCompare each attachment file name on the server with the link in the articleEvery name matches exactly (row 5 in the example)
Real link addressOn the front end, copy the address of one attachment link and one imageIt points at the site root, not at a path under the article
Old hostPaste each article's HTML into the old-host link checker with old.example as the old domainNo link, image or file points at old.example (row 7 in the example)
After launchRead the server's not-found log for paths under /media/k2/ and /images/No entries for a week

Keep the old server and its files unchanged until every row passes. K2Bridge only reads the source database, and copying files does not change the old site either.

What this walkthrough does not cover

Link to section

Galleries and video plugins are not migrated by K2Bridge, so this guide has no copy steps for them. Plan them as separate work and test them on staging.

Comments, menus, modules, templates and permissions are also outside the import. For old K2 URLs and redirects, use the URL preservation checklist.

Sources

All sources read on 20 November 2026. The image and attachment paths were also checked in the K2Bridge 1.0.2 package code. The Joomla pages are the official help screens served by help.joomla.org. The site, item numbers and file names are fictional; the hashes are the real K2 names for those fictional item IDs. Direct-file access addition: access-control documentation from the Joomla project and published K2Bridge exclusions read 23 November 2026; the visibility row is fictional, not a measured result.