Please note, you should not use titlesec with KOMA-Script classes. Instead you should use \RedeclareSectionCommand and\setkomafont and redefine \chapterlinesformat (or \chapterlineswithprefixformat) and \sectionlinesformat, e.g.:
\documentclass[
11pt,% not needed, because it is the default
pagesize=auto,% not needed, because it is the default
version=last,% as long as you don't use deprecated options not needed
]{scrbook}
\usepackage[french]{babel}% frenchb is deprecated
\usepackage[babel=true]{csquotes}
\usepackage[T1]{fontenc}
\usepackage[svgnames]{xcolor}
\usepackage{charter}
\usepackage{tgheros}% You could also use \usepackage{helvet}.
\usepackage{graphicx}
\setkomafont{section}{\normalsize}
\newkomafont{chapterformat}{\fontsize{64}{64}\normalfont\bfseries\color{number}}
\newkomafont{chapterformattext}{\normalfont\small\itshape}
\newkomafont{sectionformat}{\Large\color{number}}
\colorlet{numberbackground}{blue}
\colorlet{disposition}{DeepSkyBlue}
\colorlet{number}{white}
\addtokomafont{disposition}{\color{disposition}}
\addtokomafont{chapter}{\scshape}
\newcommand*{\chapterimage}{example-image}
\renewcommand*{\chapterformat}{%
{%
\usekomafont{chapterformat}{%
\raisebox{-\dimexpr\fboxsep+\fboxrule\relax}{%
\includegraphics[width=.35\textwidth,height=.3\textwidth]{\chapterimage}%
}%
\makebox[0pt][r]{%
\colorbox{numberbackground}{%
\parbox[b]{1em}{\centering
{\usekomafont{chapterformattext}{\chapapp\\[-1ex]}}%
\thechapter% \autodot?
}%
}%
}%
}%
}%
\enskip
}
\makeatletter
\renewcommand*{\chapterlinesformat}[3]{%
\ifstr{#1}{chapter}{%
#2\parbox[b]{.65\textwidth}{\raggedchapter #3}%
}{%
\@hangfrom{#2}{#3}%
}%
}
\makeatother
\renewcommand*{\sectionformat}{%
\colorbox{numberbackground}{%
\makebox[5em]{\usekomafont{sectionformat}{\thesection\autodot}}%
}%
\hskip 1em\nobreak
}
\makeatletter
\renewcommand*{\sectionlinesformat}[4]{%
\ifstr{#1}{section}{%
\hskip#2#3\nobreak
\parbox[b]{\dimexpr\linewidth-6em-2\fboxsep-2\fboxrule-#2\relax}{%
{\raggedsection#4\par}%
\vskip -\ht\strutbox
\hskip -1em\rule{\dimexpr\linewidth+1em}{1pt}%
}%
}{%
\@hangfrom{\hskip#2#3}{#4}%
}%
}
\makeatother
\RedeclareSectionCommand[indent=.1\textwidth]{section}
\begin{document}
\tableofcontents
\chapter{Preliminaries}
\section{Test section}
\chapter{What happens if the chapter title is too long}
\section{What happens if the section title also needs more than one
line}
\end{document}

This also works for chapter or section titles with more than one line:

For not numbered chapters it prints a title without background image:

If you want the background image in this case too, you have to move the output of the background image from \chapterformat to \chapterlinesformat.
If you want to change the color of the chapter entries to the table of contents, you can change the font of element chapterentry, e.g.:
\addtokomafont{chapterentry}{\normalcolor}
titlesecis according to Markus Kohm, the KOMA-Script developer, not fully compatible to KOMA-Script classes (andscrextend). If you understand German, see my answer in Incompatibilities between KOMA-Script and titlesec. Perhaps you stumbled here over such an incompatibility. Maybe it would have worked, if the\setkomafont{chapter}line would have been set after alltitlesec definitions. Your solution is the “raw” LaTeX version. – Speravir Dec 24 '13 at 22:46